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

simple-get

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-get - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

22

index.js

@@ -7,3 +7,3 @@ module.exports = simpleGet

var url = require('url')
var zlib = require('zlib')
var unzipResponse = require('unzip-response')

@@ -46,21 +46,3 @@ function simpleGet (opts, cb) {

// Support gzip/deflate
if (['gzip', 'deflate'].indexOf(res.headers['content-encoding']) !== -1) {
// Pipe the response through an unzip stream (gunzip, inflate) and wrap it so it
// looks like an `http.IncomingMessage`.
var stream = zlib.createUnzip()
res.pipe(stream)
res.on('close', function () { stream.emit('close') })
stream.httpVersion = res.httpVersion
stream.headers = res.headers
stream.trailers = res.trailers
stream.setTimeout = res.setTimeout.bind(res)
stream.method = res.method
stream.url = res.url
stream.statusCode = res.statusCode
stream.socket = res.socket
cb(null, stream)
} else {
cb(null, res)
}
cb(null, unzipResponse(res))
})

@@ -67,0 +49,0 @@ req.on('error', cb)

7

package.json
{
"name": "simple-get",
"description": "Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines.",
"version": "1.3.3",
"version": "1.3.4",
"author": {

@@ -14,3 +14,4 @@ "name": "Feross Aboukhadijeh",

"dependencies": {
"once": "^1.3.1"
"once": "^1.3.1",
"unzip-response": "^1.0.0"
},

@@ -20,3 +21,3 @@ "devDependencies": {

"self-signed-https": "^1.0.5",
"standard": "^3.3.0",
"standard": "^4.5.2",
"string-to-stream": "^1.0.0",

@@ -23,0 +24,0 @@ "tape": "^4.0.0"

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