httpx
httpx copied to clipboard
A next generation HTTP client for Python. 🦋
this allows usgae of `rsp.raise_for_status(rsp.text)`, in many error response, the body contains more error messages. # Summary # Checklist - [ ] I understand that this PR may be closed...
# Summary I would like to suggest adding a little syntax sugar. It might be more convenient to use `response.content_type` instead of `response.headers.get("Content-Type")`. I hope I haven't forgotten any places...
# Summary As it is, the documentation hints at the possibility of sending a request with a multipart form encoded body, but it is not explicit about it. Hence it...
Updates the requirements on [rich](https://github.com/Textualize/rich), [mkdocs-material](https://github.com/squidfunk/mkdocs-material), [twine](https://github.com/pypa/twine), [coverage[toml]](https://github.com/nedbat/coveragepy), [cryptography](https://github.com/pyca/cryptography), [mypy](https://github.com/python/mypy), [pytest](https://github.com/pytest-dev/pytest), [ruff](https://github.com/astral-sh/ruff), [trio](https://github.com/python-trio/trio), [trustme](https://github.com/python-trio/trustme) and [uvicorn](https://github.com/encode/uvicorn) to permit the latest version. Updates `rich` to 14.0.0 Release notes Sourced from rich's...
httpx Version: `0.28.1` ```python import asyncio, httpx async def test(): sync_client = httpx.Client(base_url="https://httpbin.org") async_client = httpx.AsyncClient(base_url="https://httpbin.org") try: response = await async_client.request("POST", "/post", data=[{"a": "b"}]) print(response) except Exception as e: print(e)...
### Description: I'm trying to make HTTP requests through a SOCKS5 proxy with username/password authentication. --- ### Working (synchronous `requests`): This works fine using the `requests` library: ```python import requests...
- [ ] Initially raised as discussion #3479 I got no response, so I'm opening this issue for more visibility. OS: Windows 11 `python --version`: `Python 3.12.8` `httpx` version: `0.28.1`...
# Summary Creating a client takes 25ms of CPU time. This is a lot. Most of that time is spent initialising the SSL context. Since the context is private anyway,...
Discussions #3190 #3279 Errors occurred while downloading a lot of small (~2KB) files with 8 threads on both secure and clear text HTTP/2 but not HTTP/1.1. The following statistics of...
# Summary From https://github.com/encode/httpx/discussions/3523 Importing the `_main.py` module in `httpx/__init__.py` adds 0.087s worth of import time on my machine (MacBook M1 Pro, 32 GB RAM, macOS 15.3.1) running Python 3.13.2....