http

package
v0.195.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LimitHTTPBody

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

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 NewPrivateClient

func NewPrivateClient(c Client) Client

func WithTLSConfig

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

func WithTimeout

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