var request = require('request'); request('https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token='+_token+'&type=jsapi', function (error, response, body) { if (!error && response.statusCode == 200) { body = JSON.parse(body) //处理。。。。。 } })
安装:
npm install request