httpClientOptions

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(client *http.Client, options ...com.HTTPClientOptions) *http.Client

func CheckRedirect

func CheckRedirect(fn func(req *http.Request, via []*http.Request) error) com.HTTPClientOptions

func CookieJar

func CookieJar(cookieJar http.CookieJar) com.HTTPClientOptions

func Dial

func Dial(fn func(network, addr string) (net.Conn, error)) com.HTTPClientOptions

func DialContext

func DialContext(fn func(ctx context.Context, network, addr string) (net.Conn, error)) com.HTTPClientOptions

func DialTLS

func DialTLS(fn func(network, addr string) (net.Conn, error)) com.HTTPClientOptions

func DialTLSContext

func DialTLSContext(fn func(ctx context.Context, network, addr string) (net.Conn, error)) com.HTTPClientOptions

func DisableCompression

func DisableCompression(disabled bool) com.HTTPClientOptions

func DisableKeepAlives

func DisableKeepAlives(disabled bool) com.HTTPClientOptions

func ExpectContinueTimeout

func ExpectContinueTimeout(t time.Duration) com.HTTPClientOptions

func ForceAttemptHTTP2

func ForceAttemptHTTP2(on bool) com.HTTPClientOptions

func IdleConnTimeout

func IdleConnTimeout(t time.Duration) com.HTTPClientOptions

func InsecureSkipVerify

func InsecureSkipVerify(skips ...bool) com.HTTPClientOptions

func MaxConnsPerHost

func MaxConnsPerHost(max int) com.HTTPClientOptions

func MaxIdleConns

func MaxIdleConns(max int) com.HTTPClientOptions

func MaxIdleConnsPerHost

func MaxIdleConnsPerHost(max int) com.HTTPClientOptions

func MaxResponseHeaderBytes

func MaxResponseHeaderBytes(max int64) com.HTTPClientOptions

func NewClient

func NewClient(options ...com.HTTPClientOptions) *http.Client

func Proxy

func Proxy(fn func(*http.Request) (*url.URL, error)) com.HTTPClientOptions

func ProxyConnectHeader

func ProxyConnectHeader(header http.Header) com.HTTPClientOptions

func ReadBufferSize

func ReadBufferSize(size int) com.HTTPClientOptions

func ResponseHeaderTimeout

func ResponseHeaderTimeout(t time.Duration) com.HTTPClientOptions

func TLSClientConfig

func TLSClientConfig(cfg *tls.Config) com.HTTPClientOptions

func TLSHandshakeTimeout

func TLSHandshakeTimeout(t time.Duration) com.HTTPClientOptions

func TLSNextProto

func TLSNextProto(next map[string]func(authority string, c *tls.Conn) http.RoundTripper) com.HTTPClientOptions

func Timeout

func Timeout(timeout time.Duration) com.HTTPClientOptions

func Transport

func Transport(tr *http.Transport) com.HTTPClientOptions

func WriteBufferSize

func WriteBufferSize(size int) com.HTTPClientOptions

Types

This section is empty.

Jump to

Keyboard shortcuts

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