情况:客户端js向nodejs express服务器发送ajax请求。
客户
xmlHttpRequest=new XMLHttpRequest();
xmlHttpRequest.open("POST","/some/server/path,true);
xmlHttpRequest.responseType="arraybuffer";
xmlHttpRequest.send(new Uint8Array(arraybufferobject));
服务器(到目前为止)
var express = require('express');
var server = express();
server.use(express.static(__dirname));
server.use(express.bodyParser());
server.post('/goforms/modbus/',function(req,res,next){
//How to access the uint8array || arraybuffer ?
});
server.listen(80);
我卡在这一点上。如何访问 HTTP POST 数据?