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

httpreq

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

httpreq - npm Package Compare versions

Comparing version 0.4.16 to 0.4.20

26

contributors.md
###### Contributors
[Sam](https://github.com/SamDecrock)
<font color="#999">58 Commits</font> / <font color="#6cc644">2241++</font> / <font color="#bd3c00"> 987--</font>
<font color="#dedede">87.88%&nbsp;<font color="#dedede">|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><font color="#f4f4f4">|||||||||||||||||||||</font><br><br>
<font color="#999">63 Commits</font> / <font color="#6cc644">2309++</font> / <font color="#bd3c00"> 1040--</font>
<font color="#dedede">81.82%&nbsp;<font color="#dedede">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||</font><br><br>
[Franklin van de Meent](https://github.com/fvdm)
<font color="#999">6 Commits</font> / <font color="#6cc644">44++</font> / <font color="#bd3c00"> 15--</font>
<font color="#dedede">09.09%&nbsp;<font color="#dedede">||||||||||||||||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><br><br>
<font color="#999">8 Commits</font> / <font color="#6cc644">51++</font> / <font color="#bd3c00"> 16--</font>
<font color="#dedede">10.39%&nbsp;<font color="#dedede">||||||||||||||||||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><br><br>
[Russell Beattie](https://github.com/russellbeattie)
<font color="#999">1 Commits</font> / <font color="#6cc644">55++</font> / <font color="#bd3c00"> 3--</font>
<font color="#dedede">01.52%&nbsp;<font color="#dedede">||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><br><br>
<font color="#dedede">01.30%&nbsp;<font color="#dedede">||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><br><br>
[Jason Prickett MSFT](https://github.com/jpricketMSFT)
<font color="#999">1 Commits</font> / <font color="#6cc644">5++</font> / <font color="#bd3c00"> 0--</font>
<font color="#dedede">01.30%&nbsp;<font color="#dedede">||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><br><br>
[null](https://github.com/jjharriso)
<font color="#999">1 Commits</font> / <font color="#6cc644">12++</font> / <font color="#bd3c00"> 0--</font>
<font color="#dedede">01.30%&nbsp;<font color="#dedede">||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><br><br>
[MJJ](https://github.com/mjj2000)
<font color="#999">1 Commits</font> / <font color="#6cc644">11++</font> / <font color="#bd3c00"> 1--</font>
<font color="#dedede">01.52%&nbsp;<font color="#dedede">||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><br><br>
###### [Generated](https://github.com/jakeleboeuf/contributor) on Mon Aug 03 2015 11:52:33 GMT+0200 (CEST)
<font color="#dedede">01.30%&nbsp;<font color="#dedede">||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><br><br>
[Jeff Young](https://github.com/jeffyoung)
<font color="#999">1 Commits</font> / <font color="#6cc644">19++</font> / <font color="#bd3c00"> 1--</font>
<font color="#dedede">01.30%&nbsp;<font color="#dedede">||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><br><br>
[Dave Preston](https://github.com/davepreston)
<font color="#999">1 Commits</font> / <font color="#6cc644">5++</font> / <font color="#bd3c00"> 0--</font>
<font color="#dedede">01.30%&nbsp;<font color="#dedede">||</font><font color="#f4f4f4">||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</font><br><br>
###### [Generated](https://github.com/jakeleboeuf/contributor) on Mon May 02 2016 11:08:45 GMT+0200 (CEST)

@@ -89,3 +89,3 @@ var httpreq = require('./lib/httpreq');

files:{
fileToUpload: __dirname + "/exampleupload.jpg"
fileToUpload: __dirname + "/test/testupload.jpg"
}},

@@ -92,0 +92,0 @@ function (err, res){

@@ -46,2 +46,13 @@ /*

exports.options = function(url, options, callback){
// if only 2 args are provided
if(callback === undefined && options && typeof(options)==="function")
callback = options;
var moreOptions = options;
moreOptions.url = url;
moreOptions.method = 'OPTIONS';
doRequest(moreOptions, callback);
}
exports.post = function(url, options, callback){

@@ -120,2 +131,6 @@ // if only 2 args are provided

if(o.encodePostParameters === undefined){
o.encodePostParameters = true;
}
var chunks = [];

@@ -177,4 +192,11 @@ var body; // Buffer

for(var key in o.parameters){
// According to RFC 2388 (https://www.ietf.org/rfc/rfc2388.txt)
// "Field names originally in non-ASCII character sets MAY be encoded
// within the value of the "name" parameter using the standard method
// described in RFC 2047."
// -- encodePostParameters -- true by default and MAY be changed by the user
var headerKey = o.encodePostParameters ? encodeURIComponent(key) : key;
var encodedParameter = separator + crlf
+ 'Content-Disposition: form-data; name="'+encodeURIComponent(key)+'"' + crlf
+ 'Content-Disposition: form-data; name="' + headerKey + '"' + crlf
+ crlf

@@ -264,3 +286,15 @@ + o.parameters[key] + crlf;

}
if(isHttps && o.ciphers) {
requestoptions.ciphers = o.ciphers;
}
if(isHttps && o.passphrase ) {
requestoptions.passphrase = o.passphrase ;
}
if(isHttps && o.pfx) {
requestoptions.pfx = o.pfx;
}
if(isHttps && o.ca) {

@@ -329,2 +363,7 @@ requestoptions.ca = o.ca;

if(res.headers.location && o.allowRedirects){
// Close any open file
if (o.downloadlocation) {
downloadstream.end();
}
if(o.redirectCount < o.maxRedirects){

@@ -331,0 +370,0 @@ o.redirectCount++;

{
"name": "httpreq",
"description": "node-httpreq is a node.js library to do HTTP(S) requests the easy way",
"version": "0.4.16",
"version": "0.4.20",
"author": {

@@ -33,14 +33,14 @@ "name": "Sam Decrock",

{
"name": "Sam",
"email": null,
"url": "https://github.com/SamDecrock",
"contributions": 60,
"additions": 2275,
"deletions": 1021,
"hireable": true
"name": "Russell Beattie",
"email": "russ@russellbeattie.com",
"url": "https://github.com/russellbeattie",
"contributions": 1,
"additions": 55,
"deletions": 3,
"hireable": null
},
{
"name": "Dave Preston",
"name": "Jason Prickett MSFT",
"email": null,
"url": "https://github.com/davepreston",
"url": "https://github.com/jpricketMSFT",
"contributions": 1,

@@ -52,11 +52,20 @@ "additions": 5,

{
"name": "Russell Beattie",
"email": "russ@russellbeattie.com",
"url": "https://github.com/russellbeattie",
"name": null,
"email": null,
"url": "https://github.com/jjharriso",
"contributions": 1,
"additions": 55,
"deletions": 3,
"additions": 12,
"deletions": 0,
"hireable": null
},
{
"name": "Sam",
"email": null,
"url": "https://github.com/SamDecrock",
"contributions": 63,
"additions": 2309,
"deletions": 1040,
"hireable": true
},
{
"name": "MJJ",

@@ -71,11 +80,29 @@ "email": null,

{
"name": "Jeff Young",
"email": null,
"url": "https://github.com/jeffyoung",
"contributions": 1,
"additions": 19,
"deletions": 1,
"hireable": null
},
{
"name": "Dave Preston",
"email": null,
"url": "https://github.com/davepreston",
"contributions": 1,
"additions": 5,
"deletions": 0,
"hireable": null
},
{
"name": "Franklin van de Meent",
"email": "fr@nkl.in",
"url": "https://github.com/fvdm",
"contributions": 6,
"additions": 44,
"deletions": 15,
"hireable": true
"contributions": 8,
"additions": 51,
"deletions": 16,
"hireable": null
}
]
}

@@ -6,3 +6,3 @@ node-httpreq

Do GET, POST, PUT, DELETE, upload files, use cookies, change headers, ...
Do GET, POST, PUT, DELETE, OPTIONS, upload files, use cookies, change headers, ...

@@ -35,2 +35,3 @@ ## Install

* [httpreq.delete(url, [options], callback)](#delete)
* [httpreq.options(url, [options], callback)](#options)
* [Uploading files](#upload)

@@ -121,2 +122,3 @@ * [Downloading a binary file](#binary)

- maxRedirects: (default: __10__ ). For example 1 redirect will allow for one normal request and 1 extra redirected request.
- encodePostParameters: (default: __true__ ), if true, POST/PUT parameters names will be URL encoded.
- timeout: (default: none). Adds a timeout to the http(s) request. Should be in milliseconds.

@@ -188,2 +190,8 @@ - proxy, if you want to pass your request through a http(s) proxy server:

---------------------------------------
<a name="options" />
### httpreq.options(url, [options], callback)
Same options as [httpreq.get(url, [options], callback)](#get) except for the ability to follow redirects.
---------------------------------------
<a name="upload" />

@@ -190,0 +198,0 @@ ### Uploading files

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