% and # in the URL

This commit is contained in:
Shishkin Artem 2018-05-11 11:42:23 +03:00
parent f60c73fbb4
commit 5e234a09af

View File

@ -9,6 +9,8 @@ import (
)
func (c *Client) req(method string, 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