allow array data in m.request

This commit is contained in:
Leo 2017-01-23 18:03:33 -05:00
parent 813bfb5643
commit 1b43c3a106
3 changed files with 24 additions and 24 deletions

View file

@ -1,15 +1,13 @@
"use strict"
module.exports = function(object, dataKeys) {
module.exports = function(object) {
if (Object.prototype.toString.call(object) !== "[object Object]") return ""
var args = []
dataKeys = dataKeys || Object.keys(object)
for (var i = 0; i < dataKeys.length; i++) {
var key = dataKeys[i]
for (var key in object) {
destructure(key, object[key])
}
return args.join("&")
function destructure(key, value) {