Skip to content

Commit

Permalink
add context
Browse files Browse the repository at this point in the history
  • Loading branch information
klaidliadon authored and VojtechVitek committed Mar 12, 2024
1 parent 3f1f017 commit 4ae54d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions _examples/golang-basics/example.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions _examples/golang-imports/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions client.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func urlBase(addr string) string {

// newRequest makes an http.Request from a client, adding common headers.
func newRequest(ctx context.Context, url string, reqBody io.Reader, contentType string) (*http.Request, error) {
req, err := http.NewRequest("POST", url, reqBody)
req, err := http.NewRequestWithContext(ctx, "POST", url, reqBody)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -295,4 +295,4 @@ func HTTPRequestHeaders(ctx context.Context) (http.Header, bool) {
}

{{- end -}}
{{- end -}}
{{- end -}}

0 comments on commit 4ae54d6

Please sign in to comment.