Popsicle Retry
Enable request retry for Popsicle.
Installation
npm install popsicle-retry --save
Usage
; const send = ;const res = await ;
Methods
- retry(fn, shouldRetry?) Wraps a request function with retry support. Accepts a second function that returns a delay, or
-1
(default isretries()
). - retryAllowed(error?, request?) Check if a request should be retried. Defaults to
5xx
and unavailable errors. - retries(count?, isRetryAllowed?) An exponential back-off function, defaulting to 3 retries.
License
Apache 2.0