-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Instead of always defaulting to http.DefaultClient, allowing passing one during NewClient configuration
Use cases
This would allow one to specify a custom roundtripper without mutating the http.DefaultClient global variable, this could be useful for adding certificates for custom endpoints that use self-signed certificates or are missing intermediaries.
Proposed solution
Simply allow passing an http client in the New* constructors
Is there a workaround to accomplish this today?
Mutate the global http.DefaultClient which is bad practice and has unintended side-effects for shared code
References & Prior Work
Nope
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request