From 09a8846daf902ffd5d73a024d03ca954de62beee Mon Sep 17 00:00:00 2001 From: Mendy Danzinger Date: Mon, 30 Sep 2019 15:24:05 -0400 Subject: [PATCH] remove ResolveReference call --- godo.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/godo.go b/godo.go index cdeb1749..b3919052 100644 --- a/godo.go +++ b/godo.go @@ -227,13 +227,11 @@ func SetUserAgent(ua string) ClientOpt { // BaseURL of the Client. Relative URLS should always be specified without a preceding slash. If specified, the // value pointed to by body is JSON encoded and included in as the request body. func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error) { - rel, err := url.Parse(urlStr) + u, err := c.BaseURL.Parse(urlStr) if err != nil { return nil, err } - u := c.BaseURL.ResolveReference(rel) - buf := new(bytes.Buffer) if body != nil { err = json.NewEncoder(buf).Encode(body)