popsicle-retry
Enable request retry for Popsicle
Last updated 6 years ago by blakeembrey .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install popsicle-retry 
SYNC missed versions from official npm registry.

Popsicle Retry

NPM version NPM downloads Build status Test coverage

Enable request retry for Popsicle.

Installation

npm install popsicle-retry --save

Usage

import { retry } from "popsicle-retry";

const send = retry(transport);
const res = await send(req);

Methods

  • retry(fn, shouldRetry?) Wraps a request function with retry support. Accepts a second function that returns a delay, or -1 (default is retries()).
  • 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

Current Tags

  • 4.1.0                                ...           latest (6 years ago)

10 Versions

  • 4.1.0                                ...           6 years ago
  • 4.0.0                                ...           7 years ago
  • 3.2.1                                ...           10 years ago
  • 3.2.0                                ...           10 years ago
  • 3.1.0                                ...           10 years ago
  • 3.0.1                                ...           10 years ago
  • 3.0.0                                ...           10 years ago
  • 2.0.0                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (12)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |