Help us shape the future of Go! Take the 2026 Go Developer Survey

http

package
v0.201.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 10 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.

func NewTransport added in v0.200.0

func NewTransport(dialFunc func(context.Context, string, string) (net.Conn, error)) *http.Transport

Create a new transport that uses the provided dialFunc

Types

type Client

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

func NewPrivateClient added in v0.188.0

func NewPrivateClient(c Client) Client

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