cleanup code
This commit is contained in:
parent
26452d0f53
commit
c06c7958e2
10 changed files with 64 additions and 14 deletions
|
@ -25,13 +25,15 @@ func GetHTTPSession() *http.Client {
|
|||
IdleConnTimeout: 90 * time.Second,
|
||||
TLSHandshakeTimeout: 10 * time.Second,
|
||||
ExpectContinueTimeout: 1 * time.Second,
|
||||
MaxIdleConnsPerHost: 10,
|
||||
MaxConnsPerHost: 10,
|
||||
MaxIdleConnsPerHost: 20,
|
||||
MaxConnsPerHost: 20,
|
||||
ResponseHeaderTimeout: 30 * time.Second,
|
||||
DisableCompression: false,
|
||||
}
|
||||
|
||||
httpSession = &http.Client{
|
||||
Transport: transport,
|
||||
Timeout: 30 * time.Second,
|
||||
Timeout: 60 * time.Second,
|
||||
}
|
||||
})
|
||||
return httpSession
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue