httpx-aiohttp provides an aiohttp-powered transport layer for HTTPX, allowing users to leverage aiohttp's robust asynchronous HTTP capabilities within the familiar HTTPX API. It is currently at version 0.1.12 and is actively maintained with frequent minor releases addressing compatibility and bug fixes.
pip install httpx-aiohttpVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to create an `httpx.AsyncClient` that uses `HttpxAiohttpTransport` to perform an asynchronous GET request to `httpbin.org`.
Update authentication to use `httpx.BasicAuth('username', 'password')` instead of `('username', 'password')` tuple.Upgrade to `httpx-aiohttp` version 0.1.9 or newer to ensure proper resource management.
Ensure you are using `httpx-aiohttp` version 0.1.12 or newer for full Python 3.8 compatibility.
Upgrade to `httpx-aiohttp` version 0.1.8 or newer to ensure `Content-Type` is correctly omitted for empty GET requests.
Be aware that HTTP/2 is not supported when using this transport. If HTTP/2 is required, a different `httpx` transport or client may be necessary.