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

Method AddQueryParams

request.go:607–615  ·  view source on GitHub ↗

AddQueryParams add one or more values of specified URL query parameter for the request.

(key string, values ...string)

Source from the content-addressed store, hash-verified

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 {
608 if r.QueryParams == nil {
609 r.QueryParams = make(urlpkg.Values)
610 }
611 vs := r.QueryParams[key]
612 vs = append(vs, values...)
613 r.QueryParams[key] = vs
614 return r
615}
616
617// SetPathParams set URL path parameters from a map for the request.
618func (r *Request) SetPathParams(params map[string]string) *Request {

Callers 2

AddQueryParamsFunction · 0.80
testQueryParamFunction · 0.80

Calls

no outgoing calls

Tested by 1

testQueryParamFunction · 0.64