popsicle-retry

WebJar for popsicle-retry

License

License

GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

popsicle-retry
Last Version

Last Version

3.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

popsicle-retry
WebJar for popsicle-retry
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/blakeembrey/popsicle-retry

Download popsicle-retry

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/popsicle-retry/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>popsicle-retry</artifactId>
    <version>3.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/popsicle-retry/
implementation 'org.webjars.npm:popsicle-retry:3.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/popsicle-retry/
implementation ("org.webjars.npm:popsicle-retry:3.0.1")
'org.webjars.npm:popsicle-retry:jar:3.0.1'
<dependency org="org.webjars.npm" name="popsicle-retry" rev="3.0.1">
  <artifact name="popsicle-retry" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='popsicle-retry', version='3.0.1')
)
libraryDependencies += "org.webjars.npm" % "popsicle-retry" % "3.0.1"
[org.webjars.npm/popsicle-retry "3.0.1"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : any-promise jar [1.1.0,2)
org.webjars.npm : xtend jar [4.0.1,5)

Project Modules

There are no modules declared in this project.

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

Versions

Version
3.0.1
2.0.0