Skip to content

common_http.transports.httpx

HTTPX exchange engine using the shared transport lifecycle.

Classes

HttpxTransport

Bases: BaseTransport[httpx.AsyncClient]

HTTPX connections with exact requests and one exchange at a time.

The base supplies initialization, admission and lifecycle. Owned clients disable cookie storage: the future HttpClient owns cookie policy. Borrowed clients keep their own jar (HTTPX may store received cookies), but no jar or client defaults are applied to outgoing requests. Borrowed clients must have no event hooks; custom low-level transports must honor the base’s single-exchange contract, including no internal retry loop.

Connection configuration is fixed when opening. Explicit creation options are rejected with a borrowed client: configure them on that client instead. Request bodies are the existing in-memory contracts, not live uploads.

get_info

def get_info() -> HttpTransportInfo

prepare

def prepare(request: Request) -> Request

Freeze actual HTTPX target, framing and bytes before authentication.