Skip to content
Myr

Expand docs about retries (#2311)

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

authored by Florimond Manca · committed by GitHub · parent 9884965 · Browse files · 1 file+1 added−1 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: Tom Christie <tom@tomchristie.com>

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/advanced.md+1 added-1 removed
1091 unmodified lines
1092>>> transport = httpx.HTTPTransport(local_address="0.0.0.0")1093>>> client = httpx.Client(transport=transport)1094```10951096Connection retries are also available via this interface.1096Connection retries are also available via this interface. Requests will be retried the given number of times in case an `httpx.ConnectError` or an `httpx.ConnectTimeout` occurs, allowing smoother operation under flaky networks. If you need other forms of retry behaviors, such as handling read/write errors or reacting to `503 Service Unavailable`, consider general-purpose tools such as [tenacity](https://github.com/jd/tenacity).10971098```pycon1099>>> import httpx1100>>> transport = httpx.HTTPTransport(retries=1)
159 unmodified lines