httpclient

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) *http.Client

New creates an HTTP client with consistent timeout and TLS settings.

func NewJar

func NewJar() (*cookiejar.Jar, error)

NewJar creates a cookie jar with a public suffix list.

func NewTransport

func NewTransport(cfg TransportConfig) *http.Transport

NewTransport creates an HTTP transport with consistent TLS settings.

Types

type Config

type Config struct {
	Timeout        time.Duration
	VerifyCert     bool
	Jar            http.CookieJar
	CheckRedirect  func(req *http.Request, via []*http.Request) error
	Transport      http.RoundTripper
	RootCAs        *x509.CertPool
	ForceTLSConfig bool
}

Config configures a shared HTTP client.

type TransportConfig

type TransportConfig struct {
	VerifyCert     bool
	RootCAs        *x509.CertPool
	ForceTLSConfig bool
}

TransportConfig configures a shared HTTP transport.

Jump to

Keyboard shortcuts

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