remove optional passed-in http.client
This commit is contained in:
parent
e1b6dd4434
commit
43fe04e54f
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue