diff --git a/coder-sdk/request.go b/coder-sdk/request.go index c9f82ffa..d256aff2 100644 --- a/coder-sdk/request.go +++ b/coder-sdk/request.go @@ -27,6 +27,11 @@ func (c Client) request(ctx context.Context, method, path string, in interface{} if config.BaseURLOverride != nil { url = *config.BaseURLOverride } + if config.Query != nil { + url.RawQuery = config.Query.Encode() + } + + url.Path = path // If we have incoming data, encode it as json. var payload io.Reader @@ -39,7 +44,7 @@ func (c Client) request(ctx context.Context, method, path string, in interface{} } // Create the http request. - req, err := http.NewRequestWithContext(ctx, method, url.String()+path, payload) + req, err := http.NewRequestWithContext(ctx, method, url.String(), payload) if err != nil { return nil, xerrors.Errorf("create request: %w", err) } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy