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

Method EnableDumpEachRequestWithoutBody

client.go:720–727  ·  view source on GitHub ↗

EnableDumpEachRequestWithoutBody enable dump without body 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

718// each request, and only temporarily stores the dump content in memory, call
719// Response.Dump() to get the dump content when needed.
720func (c *Client) EnableDumpEachRequestWithoutBody() *Client {
721 return c.OnBeforeRequest(func(client *Client, req *Request) error {
722 if req.RetryAttempt == 0 { // Ignore on retry, no need to repeat enable dump.
723 req.EnableDumpWithoutBody()
724 }
725 return nil
726 })
727}
728
729// EnableDumpEachRequestWithoutHeader enable dump without header at the request-level for
730// each request, and only temporarily stores the dump content in memory, call

Callers 1

Calls 2

OnBeforeRequestMethod · 0.95
EnableDumpWithoutBodyMethod · 0.80

Tested by

no test coverage detected