Comparing version 0.3.7 to 0.3.8
@@ -80,4 +80,2 @@ /* | ||
exports.download = function (url, downloadlocation, progressCallback, callback) { | ||
var options = {}; | ||
@@ -238,4 +236,5 @@ options.url = url; | ||
}else{ | ||
downloadstream.end(); | ||
callback(null, {headers: res.headers, statusCode: res.statusCode, downloadlocation: o.downloadlocation}); | ||
downloadstream.end(null, null, function () { | ||
callback(null, {headers: res.headers, statusCode: res.statusCode, downloadlocation: o.downloadlocation}); | ||
}); | ||
} | ||
@@ -242,0 +241,0 @@ }); |
{ | ||
"name": "httpreq", | ||
"description": "node-httpreq is a node.js library to do HTTP(S) requests the easy way", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Sam Decrock", |
@@ -14,2 +14,15 @@ node-httpreq | ||
## Simple example | ||
```js | ||
var httpreq = require('httpreq'); | ||
httpreq.get('http://www.google.com', function (err, res){ | ||
if (err) return console.log(err); | ||
console.log(res.statusCode); | ||
console.log(res.headers); | ||
console.log(res.body); | ||
}); | ||
``` | ||
## How to use | ||
@@ -16,0 +29,0 @@ |
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
84147
503
300