Stanislav N. aka pztrn
9e5f98a413
All checks were successful
continuous-integration/drone/push Build is passing
25 lines
434 B
Go
25 lines
434 B
Go
package requester
|
|
|
|
import (
|
|
"net"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
// nolint:exhaustivestruct
|
|
func getHTTPClient() *http.Client {
|
|
// nolint:exhaustruct
|
|
client := &http.Client{
|
|
Transport: &http.Transport{
|
|
ExpectContinueTimeout: time.Second * 5,
|
|
DialContext: (&net.Dialer{
|
|
Timeout: time.Second * 5,
|
|
}).DialContext,
|
|
ResponseHeaderTimeout: time.Second * 5,
|
|
TLSHandshakeTimeout: time.Second * 10,
|
|
},
|
|
}
|
|
|
|
return client
|
|
}
|