Skip to content

Commit

Permalink
is this it? :-/
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Feb 27, 2024
1 parent 1b365a0 commit f46083f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/apiclient/client_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

func (c *ApiClient) NewRequest(method, url string, body interface{}) (*http.Request, error) {
if !strings.HasSuffix(c.BaseURL.Path, "/") {
if strings.HasPrefix(c.BaseURL.Path, "http") && !strings.HasSuffix(c.BaseURL.Path, "/") {
return nil, fmt.Errorf("BaseURL must have a trailing slash, but %q does not", c.BaseURL)
}

Expand Down

0 comments on commit f46083f

Please sign in to comment.