http

package
v0.171.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LimitHTTPBody added in v0.64.0

func LimitHTTPBody(client http.Client, size int64) *http.Client

func NewDefaultClient

func NewDefaultClient(urlValidator url.Validator) *http.Client

NewDefaultClient creates a client with sane defaults.

func NewLimitedDefaultClient added in v0.64.0

func NewLimitedDefaultClient(urlValidator url.Validator) *http.Client

NewLimitedDefaultClient creates a client with a limit on the response body size.

Types

type Client

type Client interface {
	Do(*http.Request) (*http.Response, error)
}

func WithTLSConfig added in v0.152.0

func WithTLSConfig(c Client, config *tls.Config) (Client, error)

func WithTimeout added in v0.152.0

func WithTimeout(c Client, t time.Duration) (Client, error)

Jump to

Keyboard shortcuts

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