Store a reference to the Request in Response
This commit is contained in:
parent
e6072d8bbc
commit
7a1a33513a
@ -156,6 +156,7 @@ func (c *Client) do(req *Request, via []*Request) (*Response, error) {
|
||||
}
|
||||
}
|
||||
|
||||
resp.Request = req
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,9 @@ type Response struct {
|
||||
// Body contains the response body for successful responses.
|
||||
Body io.ReadCloser
|
||||
|
||||
// Request is the request that was sent to obtain this Response.
|
||||
Request *Request
|
||||
|
||||
// TLS contains information about the TLS connection on which the response
|
||||
// was received.
|
||||
TLS tls.ConnectionState
|
||||
|
Loading…
Reference in New Issue
Block a user