SetCommonFormData set the form data from map for requests fired from the client which request method allows payload.
(data map[string]string)
| 233 | // SetCommonFormData set the form data from map for requests fired from the client |
| 234 | // which request method allows payload. |
| 235 | func (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, |
no outgoing calls