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

httptransport

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package httptransport provides a shared *http.Transport factory used by the Jamf Pro HTTP client and the auth providers. Lives in its own package so both can import it without creating a cycle (client already depends on auth).

Index

Constants

View Source
const ResponseHeaderTimeout = 120 * time.Second

ResponseHeaderTimeout is how long a request waits for the server to start answering once it has been sent.

Above 90s on purpose: the CloudFront edge in front of the platform gateway answers 504 after 90s (issue 392), and that 504 is a better answer than a client-side timeout — it arrives with a status the caller can act on, and at 60s the CLI gave up on requests the server was about to answer (a 1000-row computer inventory page took 45s on the reporter's tenant, and the same request timed out on another run). Not much above it either: it is also how long a dead connection hangs before the CLI says so.

Variables

This section is empty.

Functions

func HTTP1Only added in v1.33.0

func HTTP1Only(t *http.Transport) *http.Transport

HTTP1Only returns a copy of t that negotiates HTTP/1.1 and never HTTP/2. The copy has its own connection pool, so closing its idle connections cannot disturb t's.

func New

func New() *http.Transport

New returns a fresh *http.Transport tuned for the CLI's workload: large package uploads, bursts of small API calls, HTTP/2 where the server supports it. Each caller owns its pool.

Types

This section is empty.

Jump to

Keyboard shortcuts

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