Files
proxypool/tool/httpclient.go
2020-08-12 08:02:36 +08:00

19 lines
253 B
Go

package tool
import (
"net/http"
"time"
)
var httpClient = http.DefaultClient
func init() {
httpClient.Timeout = time.Second * 10
http.DefaultClient.Timeout = time.Second * 10
}
func GetHttpClient() *http.Client {
c := *httpClient
return &c
}