Skip to content
Myr

Fix redirect description about HEAD (#1520)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Fix redirect description about HEAD * Apply suggestions from code review

authored by laggardkernel · committed by GitHub · parent e05a537 · Browse files · 2 files+7 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Florimond Manca <florimond.manca@gmail.com>

Diff stats

2 files+7 added−11 removed

  • other:+7 added−11 removed

2 files+7 added−11 removed

modified:docs/compatibility.md+5 added
modified:docs/quickstart.md+2 added-11 removed
406 unmodified lines
407```408409## Redirection and History410411By default, HTTPX will follow redirects for anything except `HEAD` requests.411By default, HTTPX will follow redirects for all HTTP methods.412413414The `history` property of the response can be used to inspect any followed redirects.415It contains a list of any redirect responses that were followed, in the order416in which they were made.417
18 unmodified lines
436>>> r.history437[]438```439439If you’re making a `HEAD` request, you can use this to enable redirection:440441```pycon442>>> r = httpx.head('http://github.com/', allow_redirects=True)443>>> r.url444'https://github.com/'445>>> r.history446[<Response [301 Moved Permanently]>]447```448440## Timeouts441442HTTPX defaults to including reasonable timeouts for all network operations,443meaning that if a connection is not properly established then it should always
39 unmodified lines