remove optional passed-in http.client

This commit is contained in:
kim 2024-04-26 13:11:49 +01:00
parent e1b6dd4434
commit 43fe04e54f

View file

@ -97,9 +97,6 @@ type Config struct {
// DisableCompression: see http.Transport{}.DisableCompression.
DisableCompression bool
// HTTPClient ...
HTTPClient *http.Client
}
// Client wraps an underlying http.Client{} to provide the following:
@ -123,11 +120,6 @@ func New(cfg Config) *Client {
var c Client
c.retries = 5
if cfg.HTTPClient != nil {
// Copy over existing client.
c.client = *cfg.HTTPClient
}
d := &net.Dialer{
Timeout: 15 * time.Second,
KeepAlive: 30 * time.Second,