JSON writes form data to the server.
(ctx context.Context, method, urlpath string, formValues url.Values, opts ...RequestOption)
| 316 | |
| 317 | // JSON writes form data to the server. |
| 318 | func (c *Client) Form(ctx context.Context, method, urlpath string, formValues url.Values, opts ...RequestOption) (*http.Response, error) { |
| 319 | payload := formValues.Encode() |
| 320 | |
| 321 | opts = append(opts, |
| 322 | RequestHeader(true, contentTypeKey, contentTypeFormURLEncoded), |
| 323 | RequestHeader(true, contentLengthKey, strconv.Itoa(len(payload))), |
| 324 | ) |
| 325 | |
| 326 | return c.Do(ctx, method, urlpath, payload, opts...) |
| 327 | } |
| 328 | |
| 329 | // Uploader holds the necessary information for upload requests. |
| 330 | // |
nothing calls this directly
no test coverage detected