httpx
httpx module containing classes related to httpx.
RetryTransport ¶
Bases: HTTPTransport
httpx transport that enables retries in case of failed http requests.
Parameters:
-
retries
(int
, default:0
) –Number of total retries if request is failing.
-
delay
(int
, default:1
) –Delay between retries in seconds.
-
status_forcelist
(Optional[List[int]]
, default:None
) –Response status that should trigger a retry.
-
allowed_methods
(Optional[List[str]]
, default:None
) –HTTP methods for which retries are enabled.
handle_request ¶
Executes request and performs retries if necessary and enabled.