Documentation
¶
Index ¶
- type Option
- func EnableCookie(enable bool) Option
- func EnableInsecureTLS(enable bool) Option
- func WithProxy(proxy func(*http.Request) (*url.URL, error)) Option
- func WithProxyURL(proxyURL string) Option
- func WithTLSCert(certPEMBlock, keyPEMBlock []byte) Option
- func WithTimeout(timeout time.Duration) Option
- func WithTransport(transport http.RoundTripper) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(options *Options)
func EnableCookie ¶
EnableCookie enable or disable cookie manager
func EnableInsecureTLS ¶
EnableInsecureTLS allows insecure https
func WithProxyURL ¶
func WithTLSCert ¶
func WithTimeout ¶
func WithTransport ¶
func WithTransport(transport http.RoundTripper) Option
type Options ¶
type Options struct {
EnableCookie bool
Timeout time.Duration
DialTimeout time.Duration
DialKeepAlive time.Duration
MaxIdleConns int
IdleConnTimeout time.Duration
TLSHandshakeTimeout time.Duration
ExpectContinueTimeout time.Duration
Transport http.RoundTripper
TLSClientConfig *tls.Config
Proxy func(*http.Request) (*url.URL, error)
Errors []error
}
Click to show internal directories.
Click to hide internal directories.