Documentation ¶
Index ¶
- func CloneHTTPClientWithHeaders(httpClient *http.Client, headers map[string]string) (*http.Client, error)
- func CloneHTTPClientWithMiddlewares(httpClient *http.Client, middleware ...func(req *http.Request) error) (*http.Client, error)
- func WrapHTTPClientWithHeaders(httpClient *http.Client, headers map[string]string)
- func WrapHTTPClientWithMiddlewares(httpClient *http.Client, middleware ...func(req *http.Request) error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneHTTPClientWithHeaders ¶
func CloneHTTPClientWithHeaders(httpClient *http.Client, headers map[string]string) (*http.Client, error)
CloneHTTPClientWithHeaders clone httpClient and add default request headers
func CloneHTTPClientWithMiddlewares ¶ added in v1.1.0
func CloneHTTPClientWithMiddlewares(httpClient *http.Client, middleware ...func(req *http.Request) error) (*http.Client, error)
CloneHTTPClientWithMiddlewares clone httpClient and add custom function to middleware should not modify the request.
func WrapHTTPClientWithHeaders ¶
WrapHTTPClientWithHeaders add default request headers
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.