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 3.0.1 to 3.0.2

7

index.js

@@ -14,4 +14,3 @@ module.exports = simpleGet

function simpleGet (opts, cb) {
opts = typeof opts === 'string' ? { url: opts } : Object.assign({}, opts)
opts = Object.assign({ maxRedirects: 10 }, opts)
opts = Object.assign({ maxRedirects: 10 }, typeof opts === 'string' ? { url: opts } : opts)
cb = once(cb)

@@ -26,3 +25,3 @@

const headers = {'accept-encoding': 'gzip, deflate'}
const headers = { 'accept-encoding': 'gzip, deflate' }
if (opts.headers) Object.keys(opts.headers).forEach(k => (headers[k.toLowerCase()] = opts.headers[k]))

@@ -61,3 +60,3 @@ opts.headers = headers

if (opts.maxRedirects-- === 0) return cb(new Error('too many redirects'))
return simpleGet(opts, cb)
else return simpleGet(opts, cb)
}

@@ -64,0 +63,0 @@

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

@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh",

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