1.1.0 • Published 9 years ago

got-retry v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

got-retry Circle CI

Retry got request on network error (EAI_AGAIN, ENOTFOUND, ETIMEDOUT, etc).

Features

  • 100% identical API
  • Original got test suite passes
  • Avoid issues caused by random network issues
  • Retry functionality is based on the battle-tested retry package

Installation

$ npm install got-retry --save

Usage

Instead of:

const got = require('got');

got('https://www.roqet.io')
  .then(function () {
    // done
  });

Just require got-retry and you are all set:

const got = require('got-retry');

got('https://www.roqet.io')
  .then(function () {
    // done
  });

Options

All options (like retries, randomize...) from retry are supported.

retries

Type: Number
Default: 2

Number of retries.

Tests

Circle CI

Included tests are unmodified tests from got package.

$ make test

License

MIT © Vadym Demedes