Skip to content

Commit

Permalink
Merge pull request #262 from mdanzinger/master
Browse files Browse the repository at this point in the history
remove ResolveReference call
  • Loading branch information
bentranter authored Sep 30, 2019
2 parents 1cd7bf1 + c3e6eb0 commit 97ac73b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions godo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 97ac73b

Please sign in to comment.