MCPcopy Index your code
hub / github.com/imroc/req / SetCommonQueryParam

Method SetCommonQueryParam

client.go:479–485  ·  view source on GitHub ↗

SetCommonQueryParam set a URL query parameter with a key-value pair for requests fired from the client.

(key, value string)

Source from the content-addressed store, hash-verified

477// SetCommonQueryParam set a URL query parameter with a key-value
478// pair for requests fired from the client.
479func (c *Client) SetCommonQueryParam(key, value string) *Client {
480 if c.QueryParams == nil {
481 c.QueryParams = make(urlpkg.Values)
482 }
483 c.QueryParams.Set(key, value)
484 return c
485}
486
487// SetCommonQueryString set URL query parameters with a raw query string
488// for requests fired from the client.

Callers 5

SetCommonQueryParamsMethod · 0.95
TestSetCommonQueryParamFunction · 0.80
TestClientCloneFunction · 0.80
testQueryParamFunction · 0.80
SetCommonQueryParamFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestSetCommonQueryParamFunction · 0.64
TestClientCloneFunction · 0.64
testQueryParamFunction · 0.64