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

Method AddQueryParam

request.go:598–604  ·  view source on GitHub ↗

AddQueryParam add a URL query parameter for the request.

(key, value string)

Source from the content-addressed store, hash-verified

596
597// AddQueryParam add a URL query parameter for the request.
598func (r *Request) AddQueryParam(key, value string) *Request {
599 if r.QueryParams == nil {
600 r.QueryParams = make(urlpkg.Values)
601 }
602 r.QueryParams.Add(key, value)
603 return r
604}
605
606// AddQueryParams add one or more values of specified URL query parameter for the request.
607func (r *Request) AddQueryParams(key string, values ...string) *Request {

Callers 2

AddQueryParamFunction · 0.80
testQueryParamFunction · 0.80

Calls 1

AddMethod · 0.80

Tested by 1

testQueryParamFunction · 0.64