module documentation

Custom transports, with nicely configured defaults.

The following additional keyword arguments are currently supported by httpcore...

  • uds: str
  • local_address: str
  • retries: int

Example usages...

# Disable HTTP/2 on a single specific domain. mounts = {

"all://": httpx.HTTPTransport(http2=True), "all://*example.org": httpx.HTTPTransport()

}

# Using advanced httpcore configuration, with connection retries. transport = httpx.HTTPTransport(retries=1) client = httpx.Client(transport=transport)

# Using advanced httpcore configuration, with unix domain sockets. transport = httpx.HTTPTransport(uds="socket.uds") client = httpx.Client(transport=transport)

Class ​Async​Response​Stream Undocumented
Class ​Response​Stream Undocumented
Function map​_httpcore​_exceptions Undocumented
Constant A Undocumented
Constant HTTPCORE​_EXC​_MAP Undocumented
Constant T Undocumented
@contextlib.contextmanager
def map_httpcore_exceptions():

Undocumented

Returns
typing.Iterator[None]Undocumented
A =

Undocumented

Value
typing.TypeVar('A',
               bound='AsyncHTTPTransport')
HTTPCORE_EXC_MAP =

Undocumented

Value
{httpcore.TimeoutException: TimeoutException,
 httpcore.ConnectTimeout: ConnectTimeout,
 httpcore.ReadTimeout: ReadTimeout,
 httpcore.WriteTimeout: WriteTimeout,
 httpcore.PoolTimeout: PoolTimeout,
 httpcore.NetworkError: NetworkError,
 httpcore.ConnectError: ConnectError,
...
T =

Undocumented

Value
typing.TypeVar('T',
               bound='HTTPTransport')