mappersmith
Advanced tools
Comparing version 2.12.0 to 2.13.0
@@ -21,3 +21,6 @@ 'use strict'; | ||
multiplier: 2, // exponential factor | ||
retries: 5 // max retries | ||
retries: 5, // max retries | ||
validateRetry: function validateRetry() { | ||
return true; | ||
} // a function that returns true if the request should be retried | ||
@@ -91,3 +94,3 @@ | ||
}).catch(function (response) { | ||
shouldRetry ? scheduleRequest() : reject(enhancedResponse(response, retryCount, retryTime)); | ||
shouldRetry && retryConfigs.validateRetry(response) ? scheduleRequest() : reject(enhancedResponse(response, retryCount, retryTime)); | ||
}); | ||
@@ -94,0 +97,0 @@ }; |
{ | ||
"name": "mappersmith", | ||
"version": "2.12.0", | ||
"version": "2.13.0", | ||
"description": "It is a lightweight rest client for node.js and the browser", | ||
@@ -5,0 +5,0 @@ "author": "Tulio Ornelas <ornelas.tulio@gmail.com>", |
@@ -452,3 +452,4 @@ [![npm version](https://badge.fury.io/js/mappersmith.svg)](http://badge.fury.io/js/mappersmith) | ||
multiplier: 2, // exponential factor | ||
retries: 5 // max retries | ||
retries: 5, // max retries | ||
validateRetry: () => true // a function that returns true if the request should be retried | ||
}) | ||
@@ -455,0 +456,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94362
1905
893