Replies: 1 comment
-
|
Retries have been suggested a couple times: https://github.com/encode/httpx/issues/108 #778 https://github.com/encode/httpx/issues/1141 #1196 but I think were dropped in favor of letting users do their own thing via Event Hooks: #1246 | https://www.python-httpx.org/advanced/#event-hooks and Custom Transports: https://www.python-httpx.org/advanced/#custom-transports which have an example for connection retries using the default HTTPTransport:
Status code retries are left as an activity for the user, however https://github.com/encode/httpx/issues/984 is still open and I think a RetryTransport would be a good example in addition to the ThrottleTransport example given in that issue by @tomchristie. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Is there any way to rely on an auto-retry in httpx lib with http requests when response is temporary in error (4xx or 5xx).
We can do that with requests and urllib3.
Examples:
Beta Was this translation helpful? Give feedback.
All reactions