Socket
Socket
Sign inDemoInstall

then-request

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

then-request - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0

4

lib/index.js

@@ -89,3 +89,3 @@ 'use strict';

if (!body) {
body = new Buffer(0);
body = Buffer.alloc(0);
}

@@ -165,3 +165,3 @@ if (!Buffer.isBuffer(body)) {

res.body.pipe(concat(function (body) {
resolve(new GenericResponse(res.statusCode, res.headers, Array.isArray(body) ? new Buffer(0) : body, res.url));
resolve(new GenericResponse(res.statusCode, res.headers, Array.isArray(body) ? Buffer.alloc(0) : body, res.url));
}));

@@ -168,0 +168,0 @@ });

{
"name": "then-request",
"version": "5.0.0",
"version": "6.0.0",
"description": "A request library that returns promises, inspired by request",

@@ -20,3 +20,3 @@ "keywords": [],

"form-data": "^2.2.0",
"http-basic": "^6.0.0",
"http-basic": "^7.0.0",
"http-response-object": "^3.0.1",

@@ -50,2 +50,5 @@ "promise": "^8.0.0",

},
"engines": {
"node": ">=6.0.0"
},
"repository": {

@@ -52,0 +55,0 @@ "type": "git",

@@ -85,2 +85,3 @@ # then-request

- `maxRedirects` - sets the maximum number of redirects to follow before erroring on node.js (default: `Infinity`)
- `allowRedirectHeaders` (default: `null`) - an array of headers allowed for redirects (none if `null`).
- `gzip` - defaults to `true` but can be explicitly set to `false` on node.js to prevent then-request automatically supporting the gzip encoding on responses.

@@ -87,0 +88,0 @@ - `agent` - (default: `false`) - An `Agent` to controll keep-alive. When set to `false` use an `Agent` with default values.

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