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

Method SetQueryParam

request.go:589–595  ·  view source on GitHub ↗

SetQueryParam set an URL query parameter for the request.

(key, value string)

Source from the content-addressed store, hash-verified

587
588// SetQueryParam set an URL query parameter for the request.
589func (r *Request) SetQueryParam(key, value string) *Request {
590 if r.QueryParams == nil {
591 r.QueryParams = make(urlpkg.Values)
592 }
593 r.QueryParams.Set(key, value)
594 return r
595}
596
597// AddQueryParam add a URL query parameter for the request.
598func (r *Request) AddQueryParam(key, value string) *Request {

Callers 7

SetQueryParamsMethod · 0.95
SetQueryParamsAnyTypeMethod · 0.95
SetQueryParamFunction · 0.80
testQueryParamFunction · 0.80
testSuccessFunction · 0.80
testErrorFunction · 0.80
TestSetFileWithRetryFunction · 0.80

Calls

no outgoing calls

Tested by 4

testQueryParamFunction · 0.64
testSuccessFunction · 0.64
testErrorFunction · 0.64
TestSetFileWithRetryFunction · 0.64