httpx
httpx copied to clipboard
A next generation HTTP client for Python. 🦋
### Discussed in https://github.com/encode/httpx/discussions/3094 Originally posted by **heysarthak** February 14, 2024 Hi team, I am ussing httpx plugin, while sending httpx query "ngi%abc.com" . ideally "%" symbol should be encoded...
# Summary Maintain the response history when using transport layer that retrieves their own response with history. As discussed in [Retry After PR](https://github.com/encode/httpx/pull/3103) and observed in the [thread](https://github.com/encode/httpx/issues/108). # Checklist...
We can only create a global proxy when the client is instantiated. Whether to add proxy parameters in every client requests?
# Summary With httpx==0.27.0, I'm getting deprecation warnings like: ```python /Users/hugo/my-project/.tox/py312/.venv/lib/python3.12/site-packages/httpx/_client.py:680: DeprecationWarning: The 'app' shortcut is now deprecated. Use the explicit style 'transport=WSGITransport(app=...)' instead. warnings.warn(message, DeprecationWarning) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ```...
# Summary I have added __iadd__ magic method to the Cookies class Now we got a new interface to update cookies rather than the update method ## simple usage ```bash...
Closes #3127 Before... ```python >>> import httpx >>> data = {"key": {"this": "ain't json, buddy"}} >>> r = httpx.post("https://www.example.com", data=data) >>> r.request.content b'key=%7B%27this%27%3A+%22ain%27t+json%2C+buddy%22%7D' ``` After... ```python >>> import httpx >>>...
- [x] Initially raised as discussion #3118 Here's a gnarly thing... ```python data = {"key": {"this": "ain't json, buddy"}} httpx.post("https://www.example.com", data=data) ``` Current behavior is that we'll coerce the value...
There seems to be some performance issues in `httpx` (0.27.0) as it has much worse performance than `aiohttp` (3.9.4) with concurrently running requests (in python 3.12). The following benchmark shows...
From: https://github.com/encode/httpx/discussions/2586 Accept already encoded domains, and do not attempt to decode them. This way, any IDNA encoding would be accepted, and it's up to the application to decide the...
# Summary This PR adds a `default_user_agent` function (corresponding to [requests.utils.default_user_agent](https://github.com/psf/requests/blob/main/src/requests/utils.py#L891-L897)) and allows it to be imported using `from httpx import default_user_agent` to allow different projects to check what user-agent...