MCPcopy Create free account
hub / github.com/kataras/iris / Form

Method Form

x/client/client.go:318–327  ·  view source on GitHub ↗

JSON writes form data to the server.

(ctx context.Context, method, urlpath string, formValues url.Values, opts ...RequestOption)

Source from the content-addressed store, hash-verified

316
317// JSON writes form data to the server.
318func (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//

Callers

nothing calls this directly

Calls 3

DoMethod · 0.95
RequestHeaderFunction · 0.85
EncodeMethod · 0.80

Tested by

no test coverage detected