From c49c91989efcc1db7877fc546441281e5c274f26 Mon Sep 17 00:00:00 2001 From: Shishkin Artem Date: Fri, 11 May 2018 11:42:23 +0300 Subject: [PATCH] % and # in the URL --- requests.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requests.go b/requests.go index 97f1a06..316e252 100644 --- a/requests.go +++ b/requests.go @@ -8,6 +8,8 @@ import ( ) func (c *Client) req(method, path string, body io.Reader, intercept func(*http.Request)) (req *http.Response, err error) { + path = strings.Replace(path, "%", "%25", -1) + path = strings.Replace(path, "#", "%23", -1) r, err := http.NewRequest(method, Join(c.root, path), body) if err != nil { return nil, err