MCPcopy Index your code
hub / github.com/coder/coder / WithQueryParam

Function WithQueryParam

codersdk/client.go:648–657  ·  view source on GitHub ↗

WithQueryParam adds a query parameter to the request.

(key, value string)

Source from the content-addressed store, hash-verified

646
647// WithQueryParam adds a query parameter to the request.
648func WithQueryParam(key, value string) RequestOption {
649 return func(r *http.Request) {
650 if value == "" {
651 return
652 }
653 q := r.URL.Query()
654 q.Add(key, value)
655 r.URL.RawQuery = q.Encode()
656 }
657}
658
659// HeaderTransport is a http.RoundTripper that adds some headers to all requests.
660// @typescript-ignore HeaderTransport

Callers 5

RunFunction · 0.92
CryptoKeysMethod · 0.92
WorkspaceBuildsMethod · 0.85

Calls 2

EncodeMethod · 0.80
AddMethod · 0.65