mailjet-apiv3-go
mailjet-apiv3-go copied to clipboard
Please provide a mechanism to use a custom http.Client
Currently the http.DefaultClient is used.
// NewHTTPClient returns a new httpClient
func NewHTTPClient(apiKeyPublic, apiKeyPrivate string) *HTTPClient {
return &HTTPClient{
apiKeyPublic: apiKeyPublic,
apiKeyPrivate: apiKeyPrivate,
client: http.DefaultClient,
}
}
Changing the http.DefaultClient might affect other libs. It will be nice if it's possible to provide custom http.Client.
What about (*HTTPClient) SetClient(client *http.Client)?
Thank you. I missed this information.