We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1728d06 commit a72bbfeCopy full SHA for a72bbfe
http_dumper.go
@@ -18,11 +18,12 @@ type HTTPDebugTransport struct {
18
}
19
20
// NewHTTPDebugTransport creates a HTTPDebugTransport with debug flag cached from env.
21
-func NewHTTPDebugTransport(inner http.RoundTripper) *HTTPDebugTransport {
+func NewHTTPDebugTransport(inner http.RoundTripper, opts ...Option) *HTTPDebugTransport {
22
+ combinedOpts := append([]Option{WithSkipStackFrames(4)}, opts...)
23
return &HTTPDebugTransport{
24
Transport: inner,
25
debugEnabled: os.Getenv("HTTP_DEBUG") != "",
- dumper: NewDumper(WithSkipStackFrames(4)),
26
+ dumper: NewDumper(combinedOpts...),
27
28
29
0 commit comments