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.

HTTPX logs every request URL at INFO. From open until close this transport filters the httpx logger so credential query values never reach a log handler: QUERY_CREDENTIALS plus the names reported through conceal_query.

aclose

async def aclose() -> None

get_info

def get_info() -> HttpTransportInfo

prepare

def prepare(request: Request) -> Request

Freeze actual HTTPX target, framing and bytes before authentication.