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.21.0 to 2.22.0

tests/test-agentOptions.js

26

index.js

@@ -154,3 +154,3 @@ // Copyright 2010-2012 Mikeal Rogers

if (self.url) {
if (self.url && !self.uri) {
// People use this property instead all the time so why not just support it.

@@ -388,3 +388,3 @@ self.uri = self.url

self.once('pipe', function (src) {
self.on('pipe', function (src) {
if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.")

@@ -410,5 +410,5 @@ self.src = src

self.on('pipe', function () {
console.error("You have already piped to this stream. Pipeing twice is likely to break the request.")
})
// self.on('pipe', function () {
// console.error("You have already piped to this stream. Pipeing twice is likely to break the request.")
// })
})

@@ -557,5 +557,15 @@

poolKey += options.cert.toString('ascii') + options.key.toString('ascii')
if (options.ciphers) {
if (poolKey) poolKey += ':'
poolKey += options.ciphers
}
if (options.secureOptions) {
if (poolKey) poolKey += ':'
poolKey += options.secureOptions
}
}
if (!poolKey && Agent === this.httpModule.Agent && this.httpModule.globalAgent) {
if (!poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) {
// not doing anything special. Use the globalAgent

@@ -813,3 +823,3 @@ return this.httpModule.globalAgent

if (self.dests.length !== 0) {
console.error("Ingoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
} else {

@@ -1241,2 +1251,4 @@ response.setEncoding(self.encoding)

request.Request = Request;
request.debug = process.env.NODE_DEBUG && /request/.test(process.env.NODE_DEBUG)

@@ -1243,0 +1255,0 @@

@@ -10,3 +10,3 @@ {

],
"version": "2.21.0",
"version": "2.22.0",
"author": "Mikeal Rogers <mikeal.rogers@gmail.com>",

@@ -29,3 +29,3 @@ "repository": {

"tunnel-agent": "~0.3.0",
"http-signature": "~0.9.11",
"http-signature": "~0.10.0",
"hawk": "~0.13.0",

@@ -32,0 +32,0 @@ "aws-sign": "~0.3.0",

@@ -121,3 +121,3 @@ # Request -- Simplified HTTP request method

```javascript
request.auth('username', 'password', false).get('http://some.server.com/');
request.get('http://some.server.com/').auth('username', 'password', false);
// or

@@ -124,0 +124,0 @@ request.get('http://some.server.com/', {

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