requestretry
Advanced tools
Comparing version 1.3.1 to 1.4.0
{ | ||
"name": "requestretry", | ||
"description": "request-retry wrap nodejs request to retry http(s) requests in case of error", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"author": { | ||
@@ -26,3 +26,3 @@ "name": "Francois-Guillaume Ribreau", | ||
"fg-lodash": "0.0.2", | ||
"request": "2.55.x" | ||
"request": "2.58.x" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
@@ -5,3 +5,3 @@ # Request-retry [](https://david-dm.org/FGRibreau/node-request-retry) [](https://drone.io/github.com/FGRibreau/node-request-retry/latest) | ||
When the connection fails with one of `ECONNRESET`, `ENOTFOUND`, `ESOCKETTIMEDOUT`, `ETIMEDOUT`, `ECONNREFUSED`, `EHOSTUNREACH`, `EPIPE` or when an HTTP 5xx error occurrs, the request will automatically be re-attempted as these are often recoverable errors and will go away on retry. | ||
When the connection fails with one of `ECONNRESET`, `ENOTFOUND`, `ESOCKETTIMEDOUT`, `ETIMEDOUT`, `ECONNREFUSED`, `EHOSTUNREACH`, `EPIPE`, `EAI_AGAIN` or when an HTTP 5xx error occurrs, the request will automatically be re-attempted as these are often recoverable errors and will go away on retry. | ||
@@ -56,2 +56,9 @@ ## Usage | ||
## Modifying `request` options | ||
You can access request's `defaults` method like so: | ||
```js | ||
var request = require('requestretry').request.defaults({my: options}); | ||
``` | ||
## Todo | ||
@@ -58,0 +65,0 @@ |
'use strict'; | ||
var RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE']; | ||
var RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN']; | ||
var _ = require('fg-lodash'); | ||
@@ -5,0 +5,0 @@ |
19263
70
+ Addedasync@2.6.4(transitive)
+ Addedcaseless@0.10.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedextend@2.0.2(transitive)
+ Addedform-data@1.0.1(transitive)
+ Addedhttp-signature@0.11.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedoauth-sign@0.8.2(transitive)
+ Addedqs@3.1.0(transitive)
+ Addedrequest@2.58.0(transitive)
- Removedasync@0.9.2(transitive)
- Removedcaseless@0.9.0(transitive)
- Removedcombined-stream@0.0.7(transitive)
- Removeddelayed-stream@0.0.5(transitive)
- Removedform-data@0.2.0(transitive)
- Removedhttp-signature@0.10.1(transitive)
- Removedoauth-sign@0.6.0(transitive)
- Removedqs@2.4.2(transitive)
- Removedrequest@2.55.0(transitive)
Updatedrequest@2.58.x