httpx icon indicating copy to clipboard operation
httpx copied to clipboard

A next generation HTTP client for Python. 🦋

Results 184 httpx issues
Sort by recently updated
recently updated
newest added

httpx code: ``` import httpx url = "http://ip:port" payload = OrderedDict([("key", "foo.txt"), ("acl", "public-read"), ("Content-Type", "text/plain"), ('file', ('foo.txt', 'bar'))]) r = httpx.post(url, files=payload) ``` requests code: ``` import requests url...

The following program ```python import asyncio import httpx async def main(): async with httpx.AsyncClient() as client: r = await client.get("https://httpbin.org/get?foobar", params={'hello': "world"}) print(r.url) asyncio.run(main()) ``` should print `https://httpbin.org/get?hello=world&foobar` However, the...

## Background Hello there! The Python packaging ecosystem has standardized on the interface for build backends ([PEP 517](https://peps.python.org/pep-0517/)/[PEP 660](https://peps.python.org/pep-0660/)) and the format for metadata declaration ([PEP 621](https://peps.python.org/pep-0621/)/[PEP 631](https://peps.python.org/pep-0631/)). As a...

This replaces `Dict[..., ...]` with `Mapping[..., ...]` in the union definition for `HeaderTypes`. Closes #2314. - [x] Initially raised as discussion #2314

The public API is now "fully typed" with generous use of `Any`. I have ideas of how to get rid of those but wanted to limit the scope of this...

This works: ```python client.post( url, data={"foo": ("1", "2")}, # tuple ) ``` This works: ```python client.post( url, data={"foo": ["1", "2"]}, # list files={"test": b"test"}, ) ``` This fails: ```python client.post(...

This pull request drops the `rfc3986` package dependancy, in favour of a carefully worked through `urlparse` implementation, that provides everything we need in terms of URL validation and normalisation. Closes...

https://github.com/encode/httpx/blob/3aa441015820a41861bff9b0e78d787b1a4f2f68/httpx/_types.py#L46-L47 Could `Dict` be replaced with `Mapping` in this type definition? This change would placate the type-checker when I do something like the following: ```python3 from collections.abc import Mapping from...

This was brought on https://github.com/encode/starlette/pull/1359. setuptools released 0.61.0 yesterday, and brought to light the PEP-621 which makes this PR possible. Most of the PR was inspired on this page: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html...