Comparing version 2.28.0 to 2.29.0
22
index.js
@@ -96,2 +96,10 @@ // Copyright 2010-2012 Mikeal Rogers | ||
function requester(params) { | ||
if(typeof params.options._requester === 'function') { | ||
return params.options._requester | ||
} else { | ||
return request | ||
} | ||
} | ||
request.forever = function (agentOptions, optionsArg) { | ||
@@ -113,3 +121,3 @@ var options = {} | ||
params.options.method = 'POST' | ||
return request(params.uri || null, params.options, params.callback) | ||
return requester(params)(params.uri || null, params.options, params.callback) | ||
} | ||
@@ -119,3 +127,3 @@ request.put = function (uri, options, callback) { | ||
params.options.method = 'PUT' | ||
return request(params.uri || null, params.options, params.callback) | ||
return requester(params)(params.uri || null, params.options, params.callback) | ||
} | ||
@@ -125,3 +133,3 @@ request.patch = function (uri, options, callback) { | ||
params.options.method = 'PATCH' | ||
return request(params.uri || null, params.options, params.callback) | ||
return requester(params)(params.uri || null, params.options, params.callback) | ||
} | ||
@@ -137,3 +145,4 @@ request.head = function (uri, options, callback) { | ||
} | ||
return request(params.uri || null, params.options, params.callback) | ||
return requester(params)(params.uri || null, params.options, params.callback) | ||
} | ||
@@ -143,6 +152,3 @@ request.del = function (uri, options, callback) { | ||
params.options.method = 'DELETE' | ||
if(typeof params.options._requester === 'function') { | ||
request = params.options._requester | ||
} | ||
return request(params.uri || null, params.options, params.callback) | ||
return requester(params)(params.uri || null, params.options, params.callback) | ||
} | ||
@@ -149,0 +155,0 @@ request.jar = function () { |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "2.28.0", | ||
"version": "2.29.0", | ||
"author": "Mikeal Rogers <mikeal.rogers@gmail.com>", | ||
@@ -13,0 +13,0 @@ "repository": { |
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
67312
1264