Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commite52bd24

Browse files
authored
bug: fix an issue where query parameters weren't being added to the request (#219)
1 parentb04eb60 commite52bd24

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎coder-sdk/request.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ func (c Client) request(ctx context.Context, method, path string, in interface{}
2727
ifconfig.BaseURLOverride!=nil {
2828
url=*config.BaseURLOverride
2929
}
30+
ifconfig.Query!=nil {
31+
url.RawQuery=config.Query.Encode()
32+
}
33+
34+
url.Path=path
3035

3136
// If we have incoming data, encode it as json.
3237
varpayload io.Reader
@@ -39,7 +44,7 @@ func (c Client) request(ctx context.Context, method, path string, in interface{}
3944
}
4045

4146
// Create the http request.
42-
req,err:=http.NewRequestWithContext(ctx,method,url.String()+path,payload)
47+
req,err:=http.NewRequestWithContext(ctx,method,url.String(),payload)
4348
iferr!=nil {
4449
returnnil,xerrors.Errorf("create request: %w",err)
4550
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp