我引用以下法典,但似乎不可行:
var post_req = {
array: [
[ {
param1: something ,
param2: 123
} ],
[ ],
[ ],
[ {
param2: something ,
param4: 1234,
param1: hello
} ]
]
};
var data_send = querystring.stringify(post_req);
var request = client.request( POST , / , headers);
request.end(data_send);
以及
if( req.method == POST ) {
req.addListener( data , function(chunk)
{
POST = querystring.parse(chunk);
console.log(POST);
}
}
最后,我有5个子宫,与物体中的5个参数相对应,但外加][其名称的特性:
{ array:
[ { ][param1 : something }
, { ][param2 : 123 }
, { ][param2 : something }
, { ][param4 : 1234 }
, { ][param1 : hello }
]
}