NewHTTPClient returns an *http.Client whose Transport is the shared, proxy-plugin-aware base (see Shared). Prefer this over a bare &http.Client{} for outbound requests: a bare client falls back to http.DefaultTransport and therefore silently bypasses proxy plugin mode (fixed proxy + trusted CA, or f
(timeout time.Duration)
| 64 | // A zero timeout means no client-level timeout (callers relying on context |
| 65 | // deadlines pass 0). |
| 66 | func NewHTTPClient(timeout time.Duration) *http.Client { |
| 67 | return &http.Client{ |
| 68 | Transport: Shared(), |
| 69 | Timeout: timeout, |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | // noProxyTransport is a proxy-disabled clone of http.DefaultTransport, lazily |
| 74 | // built the first time LARK_CLI_NO_PROXY is observed set. |