Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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
  • Socket score

Version published
Maintainers
1
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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc