httpx
httpx copied to clipboard
A next generation HTTP client for Python. 🦋
- [X] Initially raised as discussion #2874 There is a quite significant performance degradation when cookies are being used with requests. `httpx._client.BaseClient._merge_cookies` calls into the cookiejar here: ``` if cookies...
# Summary HTTPX already supports [calling into WSGI apps](https://www.python-httpx.org/advanced/#calling-into-python-web-apps). However, this support does not include legacy (WSGI 1) apps and frameworks that use a [write callable](https://peps.python.org/pep-3333/#the-write-callable). This small PR adds...
Closes #2892. Constrains which text codecs are supported when accessing `response.text`. (Uses the set currently supported by the Chromium browser.) Initially prompted by behaviour in https://github.com/encode/httpx/discussions/2881 where a non-text codec...
# Summary Performance improve. Related #2875 Before ``` 16002280 function calls (14002219 primitive calls) in 10.641 seconds Ordered by: internal time List reduced from 225 to 10 due to restriction...
- [x] Initially raised as discussion #2881 --- Currently when accessing `response.text` any installed codec may be loaded, depending on the `Content-Type` header of the response. This is problematic partly...
In #211 [the `Response.links` property](https://github.com/encode/httpx/blob/6a1841b924ab5d318d771e1a04ffb55662bf458b/httpx/_models.py#L766) was added, but so far it's undocumented. In code, [the `links` function's (correctly) annotated](https://github.com/encode/httpx/blob/6a1841b924ab5d318d771e1a04ffb55662bf458b/httpx/_models.py#L766) as returning a `dict[str | None, dict[str, str]]`, because going only...
Opening this draft of previously discussed addition of an option to set connect retries on the client. Next steps: - [ ] Pass type checking in CI - [ ]...
Without these, type inference would be required, the output of which can differ between type checkers. Explict fields also serves as documentation and can be a place to add explicit...
Refs #2186 Note that this is based on #2587