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

Method EnableDumpEachRequestWithoutResponse

client.go:756–763  ·  view source on GitHub ↗

EnableDumpEachRequestWithoutResponse enable dump without response 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

754// each request, and only temporarily stores the dump content in memory, call
755// Response.Dump() to get the dump content when needed.
756func (c *Client) EnableDumpEachRequestWithoutResponse() *Client {
757 return c.OnBeforeRequest(func(client *Client, req *Request) error {
758 if req.RetryAttempt == 0 { // Ignore on retry, no need to repeat enable dump.
759 req.EnableDumpWithoutResponse()
760 }
761 return nil
762 })
763}
764
765// EnableDumpEachRequestWithoutResponseBody enable dump without response body at the
766// request-level for each request, and only temporarily stores the dump content in memory,

Callers 1

Calls 2

OnBeforeRequestMethod · 0.95

Tested by

no test coverage detected