MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / NewHttpClient

Function NewHttpClient

internal/net/serve.go:286–298  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284}
285
286func NewHttpClient() *http.Client {
287 transport := &http.Transport{
288 Proxy: http.ProxyFromEnvironment,
289 TLSClientConfig: &tls.Config{InsecureSkipVerify: conf.Conf.TlsInsecureSkipVerify},
290 }
291
292 SetProxyIfConfigured(transport)
293
294 return &http.Client{
295 Timeout: time.Hour * 48,
296 Transport: &safeTransport{base: transport},
297 }
298}
299
300type safeTransport struct {
301 base http.RoundTripper

Callers 4

InitClientFunction · 0.92
uploadSliceMethod · 0.92
NewOSSClientFunction · 0.85
HttpClientFunction · 0.85

Calls 1

SetProxyIfConfiguredFunction · 0.85

Tested by

no test coverage detected