n-eager-fetch
Extension of fetch which supports passing a `retry` value in to `options`. `retry` should be an integer, `n`, and a fetch will be retried `n` times (i.e. `n + 1` fetches in total) before failing.
Last updated 3 years ago by financial-times .
Original npm · Tarball · package.json
$ cnpm install n-eager-fetch 
SYNC missed versions from official npm registry.

n-eager-fetch

Extension of fetch which supports passing a retry value in to options. retry should be an integer, n, and a fetch will be retried n times (i.e. n + 1 fetches in total) before failing.

Supports an allowedStatusCodes value in options. This is an array of integers of status codes that if responded with, won't attempt to retry.

Fetches also have a stopRetrying() method which will fulfil the promise with the reult of the current in-flight fetch and not send any more requests

Current Tags

  • 2.2.1                                ...           latest (3 years ago)

10 Versions

  • 2.2.1                                ...           3 years ago
  • 2.2.0                                ...           3 years ago
  • 2.1.3                                ...           4 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.0                                ...           5 years ago

Copyright 2014 - 2017 © taobao.org |