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 2.0.0 to 2.1.0

1

index.js

@@ -77,4 +77,5 @@ module.exports = simpleGet

if (loc.protocol) opts.protocol = loc.protocol
if (loc.auth) opts.auth = loc.auth
opts.path = loc.path
delete opts.url
}

4

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

@@ -24,3 +24,3 @@ "name": "Feross Aboukhadijeh",

"self-signed-https": "^1.0.5",
"standard": "^6.0.5",
"standard": "^7.0.1",
"string-to-stream": "^1.0.0",

@@ -27,0 +27,0 @@ "tape": "^4.0.0"

@@ -34,2 +34,24 @@ var concat = require('concat-stream')

test('basic auth', function (t) {
t.plan(4)
var server = http.createServer(function (req, res) {
t.equal(req.headers.authorization, 'Basic Zm9vOmJhcg==')
res.statusCode = 200
res.end('response')
})
server.listen(0, function () {
var port = server.address().port
get('http://foo:bar@localhost:' + port, function (err, res) {
t.error(err)
t.equal(res.statusCode, 200)
res.pipe(concat(function (data) {
t.equal(data.toString(), 'response')
server.close()
}))
})
})
})
test('follow redirects (up to 10)', function (t) {

@@ -36,0 +58,0 @@ t.plan(13)

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