simple-get
Advanced tools
Comparing version 1.4.3 to 2.0.0
@@ -59,3 +59,3 @@ module.exports = simpleGet | ||
res.on('end', function () { | ||
cb(null, Buffer.concat(chunks), res) | ||
cb(null, res, Buffer.concat(chunks)) | ||
}) | ||
@@ -62,0 +62,0 @@ }) |
{ | ||
"name": "simple-get", | ||
"description": "Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines.", | ||
"version": "1.4.3", | ||
"version": "2.0.0", | ||
"author": { | ||
@@ -24,3 +24,3 @@ "name": "Feross Aboukhadijeh", | ||
"self-signed-https": "^1.0.5", | ||
"standard": "^5.1.0", | ||
"standard": "^6.0.5", | ||
"string-to-stream": "^1.0.0", | ||
@@ -27,0 +27,0 @@ "tape": "^4.0.0" |
# simple-get [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] | ||
[travis-image]: https://img.shields.io/travis/feross/simple-get.svg?style=flat | ||
[travis-image]: https://img.shields.io/travis/feross/simple-get/master.svg | ||
[travis-url]: https://travis-ci.org/feross/simple-get | ||
[npm-image]: https://img.shields.io/npm/v/simple-get.svg?style=flat | ||
[npm-image]: https://img.shields.io/npm/v/simple-get.svg | ||
[npm-url]: https://npmjs.org/package/simple-get | ||
[downloads-image]: https://img.shields.io/npm/dm/simple-get.svg?style=flat | ||
[downloads-image]: https://img.shields.io/npm/dm/simple-get.svg | ||
[downloads-url]: https://npmjs.org/package/simple-get | ||
@@ -52,6 +52,6 @@ | ||
get.concat('http://example.com', function (err, data, res) { | ||
get.concat('http://example.com', function (err, res, data) { | ||
if (err) throw err | ||
console.log(res.statusCode) // 200 | ||
console.log(data) // 'this is the server response' | ||
console.log(data) // Buffer('this is the server response') | ||
}) | ||
@@ -58,0 +58,0 @@ ``` |
@@ -333,3 +333,3 @@ var concat = require('concat-stream') | ||
var port = server.address().port | ||
get.concat('http://localhost:' + port, function (err, data, res) { | ||
get.concat('http://localhost:' + port, function (err, res, data) { | ||
t.error(err) | ||
@@ -336,0 +336,0 @@ t.equal(res.statusCode, 200) |
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
16167