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

Method EnableDumpEachRequestWithoutRequest

client.go:744–751  ·  view source on GitHub ↗

EnableDumpEachRequestWithoutRequest enable dump without request 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

742// each request, and only temporarily stores the dump content in memory, call
743// Response.Dump() to get the dump content when needed.
744func (c *Client) EnableDumpEachRequestWithoutRequest() *Client {
745 return c.OnBeforeRequest(func(client *Client, req *Request) error {
746 if req.RetryAttempt == 0 { // Ignore on retry, no need to repeat enable dump.
747 req.EnableDumpWithoutRequest()
748 }
749 return nil
750 })
751}
752
753// EnableDumpEachRequestWithoutResponse enable dump without response at the request-level for
754// 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