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

Method SetCommonFormData

client.go:235–243  ·  view source on GitHub ↗

SetCommonFormData set the form data from map for requests fired from the client which request method allows payload.

(data map[string]string)

Source from the content-addressed store, hash-verified

233// SetCommonFormData set the form data from map for requests fired from the client
234// which request method allows payload.
235func (c *Client) SetCommonFormData(data map[string]string) *Client {
236 if c.FormData == nil {
237 c.FormData = urlpkg.Values{}
238 }
239 for k, v := range data {
240 c.FormData.Set(k, v)
241 }
242 return c
243}
244
245// SetMultipartBoundaryFunc overrides the default function used to generate
246// boundary delimiters for "multipart/form-data" requests with a customized one,

Callers 3

TestSetCommonFormDataFunction · 0.80
TestClientCloneFunction · 0.80
SetCommonFormDataFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestSetCommonFormDataFunction · 0.64
TestClientCloneFunction · 0.64