client

package
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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

func EnableCookie(enable bool) Option

EnableCookie enable or disable cookie manager

func EnableInsecureTLS

func EnableInsecureTLS(enable bool) Option

EnableInsecureTLS allows insecure https

func WithProxy

func WithProxy(proxy func(*http.Request) (*url.URL, error)) Option

func WithProxyURL

func WithProxyURL(proxyURL string) Option

func WithTLSCert

func WithTLSCert(certPEMBlock, keyPEMBlock []byte) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL