compatibility.md
This file
Path
docs/compatibility.md
20 lines · 850 bytes · Markdown
Last changed by
Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
History of this fileTake it
http3 (#86)Tom Christiebefore adoptionc9747aa
lines 1–2why, one step back1# Requests Compatibility Guide2Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 3why, one step back3HTTPX aims to be compatible with the `requests` API wherever possible.http3 (#86)Tom Christiebefore adoptionc9747aa
lines 4–6why, one step back45This documentation outlines places where the API differs...6Tweaks (#89)Tom Christiebefore adoption7c6fb5c
lines 7–12why, one step back7## QuickStart89Pretty much all the API mentioned in the `requests` QuickStart should be identical10to the API in our own documentation. The following exceptions apply:1112* `Response.url` - Returns a `URL` instance, rather than a string. Use `str(response.url)` if you need a string instance.Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 13why, one step back13* `httpx.codes` - In our documentation we prefer the uppercased versions, such as `codes.NOT_FOUND`,Tweaks (#89)Tom Christiebefore adoption7c6fb5c
lines 14–20why, one step back14but also provide lower-cased versions for API compatibility with `requests`.15* `stream=True`. - Streaming responses provide the `.stream()` and `.raw()` byte iterator interfaces, rather than the `.iter_content()` method and the `.raw` socket interface.1617## Advanced Usage1819!!! warning20 TODO