-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I'd like to add tracing to mux http calls but need a way to tap into the http.Client that mux uses under the hood. Typically other libraries expose a way to modify the http.Transport of the http.Client they're using.
I'm thinking maybe exposing this via the ConfigurationOption func:
func WithHTTPRoundTripper(roundTripper http.RoundTripper) ConfigurationOption {
return func(c *Configuration) {
c.httpRoundTripper = roundTripper
}
}and later on in client.go
if cfg.httpRoundTripper == nil {
cfg.httpRoundTripper = http.DefaultTransport
}
c.httpc = &http.Client{
Timeout: cfg.timeout,
Transport: cfg.httpRoundTripper
}rgalus, jponc and adrianmkng
Metadata
Metadata
Assignees
Labels
No labels