curlrequest
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -209,4 +209,5 @@ var util = require('util') | ||
if (options.headers) { | ||
var normalised_key; | ||
for (key in options.headers) { | ||
key = key.replace(/[_-]/g, ' ').split(' ').map(function (str) { | ||
normalised_key = key.replace(/[_-]/g, ' ').split(' ').map(function (str) { | ||
if (str.length) { | ||
@@ -217,3 +218,3 @@ str = str[0].toUpperCase() + str.substr(1); | ||
}).join('-'); | ||
headers[key] = options.headers[key]; | ||
headers[normalised_key] = options.headers[key]; | ||
} | ||
@@ -220,0 +221,0 @@ delete options.headers; |
{ "name" : "curlrequest", | ||
"description" : "A curl wrapper for node", | ||
"version" : "0.5.0", | ||
"version" : "0.5.1", | ||
"homepage" : "https://github.com/chriso/curlrequest", | ||
@@ -5,0 +5,0 @@ "author" : "Chris O'Hara <cohara87@gmail.com>", |
@@ -6,2 +6,3 @@ var curl = require('./'); | ||
, encoding: null | ||
, headers: { 'foo bar': 'wha' } | ||
}; | ||
@@ -12,7 +13,7 @@ | ||
console.log(meta.args); | ||
console.log(data); | ||
console.log(data.toString()); | ||
console.log(typeof data); | ||
//console.log(data); | ||
//console.log(data.toString()); | ||
//console.log(typeof data); | ||
//next(); | ||
}); | ||
})(); |
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
360084
11
516
3