mailjet-apiv3-go icon indicating copy to clipboard operation
mailjet-apiv3-go copied to clipboard

Please provide a mechanism to use a custom http.Client

Open nam-truong-le opened this issue 2 years ago • 1 comments

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.

nam-truong-le avatar Aug 13 '22 03:08 nam-truong-le

Thank you. I missed this information.

nam-truong-le avatar Sep 03 '22 06:09 nam-truong-le