我正在使用node-multiparty,如何记录POST请求的正文?
app.post("/submit", function(httpRequest, httpResponse, next){
var form = new multiparty.Form();
form.on("part", function(part){
if(part.filename)
{
var FormData = require("form-data");
var request = require("request")
var form = new FormData();
form.append("thumbnail", part, {filename: part.filename,contentType: part["content-type"]});
var r = request.post("http://localhost:7070/store", { "headers": {"transfer-encoding": "chunked"} }, function(err, res, body){
httpResponse.send(res);
});
r._form = form
}
})
form.on("error", function(error){
console.log(error);
})
form.parse(httpRequest);
});