File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ ## v0.11.0 (2024-04-09)
2+ - ** Feature:** Add method ` WithCaptureHTTPRequest ` to package ` runtime ` , which allows capture of HTTP requests for debugging purposes.
3+
14## v0.10.1 (2024-03-20)
25- ** Improvement:** Update ` ConfigureRegion ` method to take into account global servers without a region variable
36
Original file line number Diff line number Diff line change 5252
5353 // ContextHTTPResponse holds the raw HTTP response after the request has completed.
5454 ContextHTTPResponse = contextKey ("httpResponse" )
55+
56+ // ContextHTTPRequest holds the raw HTTP request.
57+ ContextHTTPRequest = contextKey ("httpRequest" )
5558)
5659
5760// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
Original file line number Diff line number Diff line change @@ -12,3 +12,9 @@ import (
1212func WithCaptureHTTPResponse (parent context.Context , resp * * http.Response ) context.Context {
1313 return context .WithValue (parent , config .ContextHTTPResponse , resp )
1414}
15+
16+ // WithCaptureHTTPRequest adds the raw HTTP request retrieval annotation to the parent context.
17+ // After the request has completed, the req parameter will contain the raw HTTP request made to the API.
18+ func WithCaptureHTTPRequest (parent context.Context , req * * http.Request ) context.Context {
19+ return context .WithValue (parent , config .ContextHTTPRequest , req )
20+ }
You can’t perform that action at this time.
0 commit comments