Files
giredore/internal/requester/httpclient.go
T

25 lines
434 B
Go
Raw Normal View History

2019-10-05 21:53:22 +05:00
package requester
import (
"net"
"net/http"
"time"
)
// nolint:exhaustivestruct
2019-10-05 21:53:22 +05:00
func getHTTPClient() *http.Client {
// nolint:exhaustruct
client := &http.Client{
2019-10-05 21:53:22 +05:00
Transport: &http.Transport{
ExpectContinueTimeout: time.Second * 5,
DialContext: (&net.Dialer{
Timeout: time.Second * 5,
}).DialContext,
ResponseHeaderTimeout: time.Second * 5,
TLSHandshakeTimeout: time.Second * 10,
2019-10-05 21:53:22 +05:00
},
}
return client
2019-10-05 21:53:22 +05:00
}