simple-get
Advanced tools
Comparing version 2.6.1 to 2.7.0
@@ -8,3 +8,3 @@ module.exports = simpleGet | ||
var querystring = require('querystring') | ||
var unzipResponse = require('unzip-response') // excluded from browser build | ||
var decompressResponse = require('decompress-response') // excluded from browser build | ||
var url = require('url') | ||
@@ -14,6 +14,6 @@ | ||
opts = typeof opts === 'string' ? {url: opts} : Object.assign({}, opts) | ||
opts.headers = Object.assign({}, opts.headers) | ||
cb = once(cb) | ||
if (opts.url) parseOptsUrl(opts) | ||
if (opts.headers == null) opts.headers = {} | ||
if (opts.maxRedirects == null) opts.maxRedirects = 10 | ||
@@ -58,4 +58,4 @@ | ||
var tryUnzip = typeof unzipResponse === 'function' && opts.method !== 'HEAD' | ||
cb(null, tryUnzip ? unzipResponse(res) : res) | ||
var tryUnzip = typeof decompressResponse === 'function' && opts.method !== 'HEAD' | ||
cb(null, tryUnzip ? decompressResponse(res) : res) | ||
}) | ||
@@ -62,0 +62,0 @@ req.on('timeout', function () { |
{ | ||
"name": "simple-get", | ||
"description": "Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines.", | ||
"version": "2.6.1", | ||
"version": "2.7.0", | ||
"author": { | ||
@@ -11,3 +11,3 @@ "name": "Feross Aboukhadijeh", | ||
"browser": { | ||
"unzip-response": false | ||
"decompress-response": false | ||
}, | ||
@@ -18,5 +18,5 @@ "bugs": { | ||
"dependencies": { | ||
"decompress-response": "^3.3.0", | ||
"once": "^1.3.1", | ||
"simple-concat": "^1.0.0", | ||
"unzip-response": "^2.0.1" | ||
"simple-concat": "^1.0.0" | ||
}, | ||
@@ -23,0 +23,0 @@ "devDependencies": { |
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
29278
+ Addeddecompress-response@^3.3.0
+ Addeddecompress-response@3.3.0(transitive)
+ Addedmimic-response@1.0.1(transitive)
- Removedunzip-response@^2.0.1
- Removedunzip-response@2.0.1(transitive)