Use httputil.DumpRequestOut for dumping client req

httputil.DumpRequest is only for dumping incoming requests on a server.

Signed-off-by: Jonny Stoten <jonny.stoten@docker.com>
This commit is contained in:
Jonny Stoten 2022-07-27 12:34:01 +01:00
parent 6acde90772
commit 106433b798
No known key found for this signature in database
GPG Key ID: 1A4DE8FCC4873A60

View File

@ -159,7 +159,7 @@ type DebugTransport struct {
// RoundTrip dumps request/responses and executes the request using the underlying transport.
func (t DebugTransport) RoundTrip(req *http.Request) (*http.Response, error) {
in, err := httputil.DumpRequest(req, true)
in, err := httputil.DumpRequestOut(req, true)
if err != nil {
return nil, fmt.Errorf("failed to dump request: %w", err)
}