Documentation
¶
Overview ¶
Package xhttp provides utilities and functions for working with HTTP.
Index ¶
Constants ¶
View Source
const ( // DefaultMaxIddleConns is the default maximum number of idle connections in // the pool. DefaultMaxIddleConns int = 100 // DefaultMaxIddleConnsPerHost is the default maximum number of idle connections in // the pool per host. DefaultMaxIddleConnsPerHost int = 10 // DefaultLRUClientSessionCacheCapacity is the default capacity of the LRU client session cache. DefaultLRUClientSessionCacheCapacity int = 64 )
View Source
const ( // ErrCannotDrainResponse is returned when a response body cannot be drained. ErrCannotDrainResponse xerrors.Error = "cannot drain response body" // ErrCannotCloseResponse is returned when a response body cannot be closed. ErrCannotCloseResponse xerrors.Error = "cannot close response body" )
Variables ¶
This section is empty.
Functions ¶
func DrainResponseBody ¶
DrainResponseBody reads and discards the remaining content of the response body until EOF, then closes it. If an error occurs while draining or closing the response body, an error is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.