使用request发送post请求
var request = require('request'); var url = **; var data = **; httprequest(url, data); function httprequest(url, requestData){ request({ url: url, method: "POST", json: true, headers: { "content-type": "application/json", }, body: requestData }, function(error, response, body) { if (!error && response.statusCode == 200) { console.log(body) } }); };