http.Transport is the Go net/http component that manages the low-level details of HTTP requests, including connection reuse.
http.Transport manages low-level HTTP communication, including connection reuse. Standard helpers use http.DefaultClient and http.DefaultTransport with keep-alive enabled; custom transports require deliberate configuration. section 12.3.1
Configure connection behavior deliberately:
Set DisableKeepAlives to true to disable connection reuse; setting it to false permits HTTP or TCP keep-alive but does not explicitly force reuse. section 12.3.1
How Go in Practice, Second Edition covers it
How deep it goes
Explains defaults, keep-alive semantics, custom dialing, and response closure, but stops short of broader transport internals.
Examples
Demonstrates a custom transport using TLSClientConfig, disabled compression, net.Dialer settings, and an HTTPS request.
What it assumes
Assumes basic net/http client usage and introduces custom clients, transports, keep-alive distinctions, and response-body closure.
What you can do after
Operate/configure HTTP clients with connection reuse, custom TLS settings, compression choices, and dialer timeouts.
How it connects
Connects http.Transport with http.Client, http.DefaultClient, http.DefaultTransport, keep-alive, TLS configuration, compression, and connection reuse.
Go by Examplehttp.Transport is a Go HTTP transport implementation that performs request transmission and maintains a pool of reusable network connections.
clientused by · A client is a person, organization, device, or software component that receives or uses a product, service, resource, or functionality provided by another entity.
http.RoundTripperkind of · http.RoundTripper is a Go interface whose RoundTrip method executes a single HTTP transaction and returns the response or an error.
TCPuses · TCP is a connection-oriented transport-layer protocol that provides reliable, ordered delivery of byte streams between network endpoints.
connection poolinguses · Connection pooling is a resource-management technique that maintains a collection of established connections for reuse across multiple operations.
This explainer was generated by Manning's knowledge graph from the text of Go in Practice, Second Edition. The section links point to the parts of the book it draws on.