diff options
Diffstat (limited to 'vendor/github.com/miniflux/miniflux-go/request.go')
-rw-r--r-- | vendor/github.com/miniflux/miniflux-go/request.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/vendor/github.com/miniflux/miniflux-go/request.go b/vendor/github.com/miniflux/miniflux-go/request.go index 17baf4e..a24a425 100644 --- a/vendor/github.com/miniflux/miniflux-go/request.go +++ b/vendor/github.com/miniflux/miniflux-go/request.go @@ -55,6 +55,10 @@ func (r *request) Delete(path string) (io.ReadCloser, error) { } func (r *request) execute(method, path string, data interface{}) (io.ReadCloser, error) { + if r.endpoint[len(r.endpoint)-1:] == "/" { + r.endpoint = r.endpoint[:len(r.endpoint)-1] + } + u, err := url.Parse(r.endpoint + path) if err != nil { return nil, err @@ -126,11 +130,3 @@ func (r *request) toJSON(v interface{}) []byte { return b } - -func newRequest(endpoint, username, password string) *request { - return &request{ - endpoint: endpoint, - username: username, - password: password, - } -} |