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

Method EnableDumpEachRequestWithoutResponseBody

client.go:768–775  ·  view source on GitHub ↗

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

766// request-level for each request, and only temporarily stores the dump content in memory,
767// call Response.Dump() to get the dump content when needed.
768func (c *Client) EnableDumpEachRequestWithoutResponseBody() *Client {
769 return c.OnBeforeRequest(func(client *Client, req *Request) error {
770 if req.RetryAttempt == 0 { // Ignore on retry, no need to repeat enable dump.
771 req.EnableDumpWithoutResponseBody()
772 }
773 return nil
774 })
775}
776
777// EnableDumpEachRequestWithoutRequestBody enable dump without request body at the
778// request-level for each request, and only temporarily stores the dump content in memory,

Calls 2

OnBeforeRequestMethod · 0.95

Tested by

no test coverage detected