Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

request

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request - npm Package Compare versions

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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc