Skip to content

Commit 4189e03

Browse files
committed
This was breaking things
1 parent a7b80f1 commit 4189e03

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/client/client.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ func NewClient(client *uhttp.BaseHttpClient, baseURL string, authToken string) *
2424
}
2525

2626
func (c *Client) do(ctx context.Context, method, pathAndQuery string, body io.Reader) (*http.Response, error) {
27-
url := &url.URL{
27+
fullUrl := &url.URL{
2828
Path: pathAndQuery,
2929
Host: c.baseURL,
3030
Scheme: "http",
3131
}
32-
req, err := http.NewRequestWithContext(ctx, method, url.String(), body)
32+
parsedUrl, err := url.QueryUnescape(fullUrl.String())
33+
if err != nil {
34+
return nil, err
35+
}
36+
req, err := http.NewRequestWithContext(ctx, method, parsedUrl, body)
3337
if err != nil {
3438
return nil, err
3539
}

0 commit comments

Comments
 (0)