fix Base url path being overwritten

This commit is contained in:
Samuel Lorch 2021-11-18 09:09:34 +01:00
parent 8e4637492d
commit f790467d28
2 changed files with 12 additions and 19 deletions

View file

@ -34,9 +34,9 @@ func (c *Client) DoCustomRequest(ctx context.Context, method, path, version stri
func (c *Client) DoCustomRequestAndReturnRawResponse(ctx context.Context, method, path, version string, body interface{}, opts interface{}) (*http.Response, *APIResponse, error) {
firstTime := true
start:
u, err := addOptions(path, version, opts)
u, err := generateURL(*c.baseURL, path, version, opts)
if err != nil {
return nil, nil, fmt.Errorf("Adding Request Options: %w", err)
return nil, nil, fmt.Errorf("Generating Path: %w", err)
}
req, err := c.newRequest(method, u, body)