EnableDumpEachRequestWithoutRequestBody enable dump without request 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.
()
| 778 | // request-level for each request, and only temporarily stores the dump content in memory, |
| 779 | // call Response.Dump() to get the dump content when needed. |
| 780 | func (c *Client) EnableDumpEachRequestWithoutRequestBody() *Client { |
| 781 | return c.OnBeforeRequest(func(client *Client, req *Request) error { |
| 782 | if req.RetryAttempt == 0 { // Ignore on retry, no need to repeat enable dump. |
| 783 | req.EnableDumpWithoutRequestBody() |
| 784 | } |
| 785 | return nil |
| 786 | }) |
| 787 | } |
| 788 | |
| 789 | // NewRequest is the alias of R() |
| 790 | func (c *Client) NewRequest() *Request { |
no test coverage detected