MCPcopy Create free account
hub / github.com/imroc/req / EnableDumpEachRequestWithoutHeader

Method EnableDumpEachRequestWithoutHeader

client.go:732–739  ·  view source on GitHub ↗

EnableDumpEachRequestWithoutHeader enable dump without header at the request-level for each request, and only temporarily stores the dump content in memory, call Response.Dump() to get the dump content when needed.

()

Source from the content-addressed store, hash-verified

730// each request, and only temporarily stores the dump content in memory, call
731// Response.Dump() to get the dump content when needed.
732func (c *Client) EnableDumpEachRequestWithoutHeader() *Client {
733 return c.OnBeforeRequest(func(client *Client, req *Request) error {
734 if req.RetryAttempt == 0 { // Ignore on retry, no need to repeat enable dump.
735 req.EnableDumpWithoutHeader()
736 }
737 return nil
738 })
739}
740
741// EnableDumpEachRequestWithoutRequest enable dump without request at the request-level for
742// each request, and only temporarily stores the dump content in memory, call

Callers 1

Calls 2

OnBeforeRequestMethod · 0.95

Tested by

no test coverage detected