Optional
after[413, 429, 503]
Optional
backoffThe upper limit of the delay per retry in milliseconds.
To clamp the delay, set backoffLimit
to 1000, for example.
By default, the delay is calculated in the following way:
0.3 * (2 ** (attemptCount - 1)) * 1000
The delay increases exponentially.
Infinity
Optional
delay?: ((attemptCount) => number)A function to calculate the delay between retries given attemptCount
(starts from 1).
attemptCount => 0.3 * (2 ** (attemptCount - 1)) * 1000
Optional
limit?: numberThe number of times to retry failed requests.
2
Optional
maxIf the Retry-After
header is greater than maxRetryAfter
, the request will be canceled.
Infinity
Optional
methods?: string[]The HTTP methods allowed to retry.
['get', 'put', 'head', 'delete', 'options', 'trace']
Optional
statusThe HTTP status codes allowed to retry.
[408, 413, 429, 500, 502, 503, 504]
Generated using TypeDoc
The HTTP status codes allowed to retry with a
Retry-After
header.