MCPcopy
hub / github.com/rclone/rclone / NewClientCustom

Function NewClientCustom

fs/fshttp/http.go:312–321  ·  view source on GitHub ↗

NewClientCustom returns an http.Client with the correct timeouts. It allows customizing the transport, using NewTransportCustom.

(ctx context.Context, customize func(*http.Transport))

Source from the content-addressed store, hash-verified

310// NewClientCustom returns an http.Client with the correct timeouts.
311// It allows customizing the transport, using NewTransportCustom.
312func NewClientCustom(ctx context.Context, customize func(*http.Transport)) *http.Client {
313 ci := fs.GetConfig(ctx)
314 client := &http.Client{
315 Transport: NewTransportCustom(ctx, customize),
316 }
317 if ci.Cookie {
318 client.Jar = cookieJar
319 }
320 return client
321}
322
323// NewClientWithUnixSocket returns an http.Client with the correct timeout.
324// It internally uses NewClientCustom with a custom dialer connecting to

Callers 3

NewFsFunction · 0.92
NewClientFunction · 0.85
NewClientWithUnixSocketFunction · 0.85

Calls 2

GetConfigFunction · 0.92
NewTransportCustomFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…