🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

popsicle-retry

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

popsicle-retry

Enable request retry for Popsicle

4.1.0
latest
Source
npm
Version published
Weekly downloads
30K
21.23%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

popsicle

FAQs

Package last updated on 06 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts