httpx

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package httpx gives each HTTP caller a transport of its own. A CloseIdleConnections on the process-wide http.DefaultTransport, which every httptest.Server.Close also does, breaks a caller's connections parked there (#287, #531, #564), so production code never uses http.DefaultClient or http.DefaultTransport (a forbidigo rule in .golangci.yml enforces it).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(timeout time.Duration) *http.Client

Client returns a client over a new Transport; a zero timeout means none, as for http.DefaultClient.

func Transport

func Transport() *http.Transport

Transport returns a new transport with http.DefaultTransport's settings and a connection pool of its own.

Types

This section is empty.

Jump to

Keyboard shortcuts

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