Skip to content

Commit

Permalink
fix: rtripper http method initialization rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
Uncle-Justice committed Dec 25, 2023
1 parent 8f0949f commit 03597f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/e2e/conformance/utils/roundtripper/roundtripper.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,11 @@ func (d *DefaultRoundTripper) CaptureRoundTrip(request Request) (*CapturedReques
},
}
}

method := request.Method

method := "GET"
if request.Method != "" {
method = request.Method
}
ctx, cancel := context.WithTimeout(context.Background(), d.TimeoutConfig.RequestTimeout)
defer cancel()
req, err := http.NewRequestWithContext(ctx, method, request.URL.String(), nil)
Expand Down

0 comments on commit 03597f1

Please sign in to comment.