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

Method SetCommonQueryParamsFromValues

client.go:508–518  ·  view source on GitHub ↗

SetCommonQueryParamsFromValues set URL query parameters from a url.Values map for requests fired from the client.

(params urlpkg.Values)

Source from the content-addressed store, hash-verified

506// SetCommonQueryParamsFromValues set URL query parameters from a url.Values map
507// for requests fired from the client.
508func (c *Client) SetCommonQueryParamsFromValues(params urlpkg.Values) *Client {
509 if c.QueryParams == nil {
510 c.QueryParams = make(urlpkg.Values)
511 }
512 for p, v := range params {
513 for _, pv := range v {
514 c.QueryParams.Add(p, pv)
515 }
516 }
517 return c
518}
519
520// SetCommonQueryParamsFromStruct set URL query parameters from a struct using go-querystring
521// for requests fired from the client.

Calls 1

AddMethod · 0.80

Tested by 1