猿问

请问我想用nodejs去请求网易im的接口为什么不行?

var https = require('https')

// var request = require('request');

var appKey="f2d45385f31e88233e1f1ef6c4247cce";

var appSecret='e1c115dd3ad1';

var nonce='12345'

var curTime=new Date().getTime()

var checkSum=encodeURI(appSecret + nonce + curTime)

var  options = {

     method: 'POST',

hostname: 'https://api.netease.im',

path:'/nimserver/user/create.action',

headers: {

'AppKey':appKey,

'Nonce':nonce,

'CurTime':curTime,

'CheckSum':checkSum,

'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8'

}

};

https.request(options, function (res) {

res.setEncoding('utf8');

console.log(res)

})

我要去幼儿园深造了
浏览 1074回答 0
0回答

慕勒0069038

人家网易明明说这个参数必填= =
随时随地看视频慕课网APP
我要回答