我猜您需要json
根据您的要求使用选项:
var form = { "userType": req.body.type, "userName": req.body.mobile, "email": req.body.email, "name": req.body.name, "password": req.body.password }; request.post({ url:'mylink', json: form, },function(error, response, body){ console.log(body) });
从期权文件:
json - 将body设置为值的JSON表示,并添加Content-type:application/json标头.另外,将响应主体解析为JSON.