Skip to content

Mulder90/willful

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

willful

A Fetch wrapper with retry strategies

Installation

npm install willful --save

Example

const willful = require('willful');

const reponse = await willful(url, {
    maxRetry: 3,
    retryDelay: 1000,
    retryStrategy: 'backoff'
});

Second parameter is optional. Default values are:

  • maxRetry: 3
  • retryDelay: 1000
  • retryStrategy: 'default'

The default retryStrategy retry the http call after retryDelay millisecond

About

A Fetch wrapper with retry strategies

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published