forked from TrueCloudLab/lego
Declare own HTTP client
This commit is contained in:
parent
93cfae053a
commit
453a3d6b3f
1 changed files with 1 additions and 3 deletions
|
@ -163,9 +163,7 @@ func (c *DNSProviderCloudFlare) makeRequest(method, uri string, body io.Reader)
|
||||||
req.Header.Set("X-Auth-Key", c.authKey)
|
req.Header.Set("X-Auth-Key", c.authKey)
|
||||||
req.Header.Set("User-Agent", userAgent())
|
req.Header.Set("User-Agent", userAgent())
|
||||||
|
|
||||||
client := http.DefaultClient
|
client := http.Client{Timeout: 30 * time.Second}
|
||||||
client.Timeout = time.Duration(30 * time.Second)
|
|
||||||
|
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("Error querying API -> %v", err)
|
return nil, fmt.Errorf("Error querying API -> %v", err)
|
||||||
|
|
Loading…
Reference in a new issue