NewClientCustom returns an http.Client with the correct timeouts. It allows customizing the transport, using NewTransportCustom.
(ctx context.Context, customize func(*http.Transport))
| 310 | // NewClientCustom returns an http.Client with the correct timeouts. |
| 311 | // It allows customizing the transport, using NewTransportCustom. |
| 312 | func 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 |
no test coverage detected
searching dependent graphs…