HTTPX is a Python library for making HTTP requests, meaning it lets your code talk to websites and web services by sending requests and receiving responses. It is written in Python and designed to work with Python 3.9 and later versions. What sets HTTPX apart from older tools is that it supports both synchronous and asynchronous usage. Synchronous means your code waits for each request to finish before moving on, which is the traditional approach. Asynchronous (using asyncio or trio) means your code can send many requests at the same time without waiting, which is useful when building faster apps. HTTPX also supports HTTP/2, a newer version of the web protocol that can handle multiple requests over a single connection more efficiently than HTTP/1.1. HTTPX includes a built-in command-line client, so you can send web requests directly from your terminal without writing any code, useful for quick testing. The library handles many common tasks automatically: it verifies SSL certificates for secure connections, manages cookies, supports authentication, handles automatic decompression of responses, and can send large files in chunks via streaming downloads. It can also make requests directly to WSGI and ASGI applications, which are Python web application formats, handy for testing your own web app without needing a live server. HTTPX enforces strict timeouts on all requests to prevent your program from hanging indefinitely. The project is BSD licensed.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.