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

Method EnableAllowGetMethodPayload

client.go:1365–1368  ·  view source on GitHub ↗

EnableAllowGetMethodPayload allows sending GET method requests with body.

()

Source from the content-addressed store, hash-verified

1363
1364// EnableAllowGetMethodPayload allows sending GET method requests with body.
1365func (c *Client) EnableAllowGetMethodPayload() *Client {
1366 c.AllowGetMethodPayload = true
1367 return c
1368}
1369
1370func (c *Client) isPayloadForbid(m string) bool {
1371 return (m == http.MethodGet && !c.AllowGetMethodPayload) || m == http.MethodHead || m == http.MethodOptions

Callers 2

Calls

no outgoing calls

Tested by 1