使用简单方便,轻松实现异步请求的 HTTP 客户端
>>> import httpx # 同步 >>> r = httpx.get('https://www.example.org/') >>> r <Response [200 OK]> >>> r.status_code # 异步 >>> async with httpx.AsyncClient() as client: >>> r = await client.get('https://www.example.org/') >>> r <Response [200 OK]>