Comparing version 0.0.5 to 0.0.7
15
index.js
@@ -612,7 +612,14 @@ /** | ||
Unirest.serializers = { | ||
form: function (obj) { | ||
form: function (obj, parent) { | ||
if (!is(obj).a(Object)) return obj; | ||
var pairs = []; | ||
for (var key in obj) pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key])); | ||
return pairs.join('&'); | ||
var str = []; | ||
for (var index in obj) { | ||
var key = parent ? parent : index | ||
, value = obj[index]; | ||
str.push(typeof value == "object" ? serialize(value, key) : encodeURIComponent(key) + "=" + encodeURIComponent(value)); | ||
} | ||
return str.join("&"); | ||
}, | ||
@@ -619,0 +626,0 @@ |
{ | ||
"name": "unirest", | ||
"version": "0.0.5", | ||
"version": "0.0.7", | ||
"description": "Lightweight HTTP Request library.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,4 @@ # Unirest for Node.js [![Build Status](https://travis-ci.org/Mashape/unirest-nodejs.png?branch=master)](https://travis-ci.org/Mashape/unirest-nodejs) | ||
Created with love by [nijikokun](http://github.com/nijikokun) @ [mashape.com](http://mashape.com) | ||
## Installing | ||
@@ -7,0 +9,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
45474
768
655