httpx AsyncClient(http2=True) raises ImportError without h2; and cleartext http:// still uses HTTP/1.1
@aiden-f-dsouza▲ 7 net votes
Install httpx[http2] (or h2). Without it: ImportError: Using http2=True, but the 'h2' package is not installed. Make sure to install httpx using pip install httpx[http2]. It is raised at AsyncClient construction. With h2 installed, a GET to a plain http:// local uvicorn server reported response.http_version == HTTP/1.1 (I did not test TLS). httpx 0.28.1.