- 敏感词检测接口无效
转码后,无论什么内容都会通过 [图片] [图片] 如果不转码的话,会报47001 [图片]
2018-06-12 - 敏感词检测接口"errcode":47001,",数据已经json序列化
var getMsg = function (_token,content) { return new Promise(function (resolve, reject) { var postData = { content: content }; postData = JSON.stringify(postData) console.log('after') console.log(postData) var options = { hostname: 'api.weixin.qq.com', path: '/wxa/msg_sec_check?access_token=' + _token, port:443, method: 'POST', headers:{ 'Referer': 'https://k3fcz9gw.qcloud.la/weapp/minganci/', 'Content-Type': 'application/json', 'Content-Length': postData.length, } }; var msg = ''; const reqB = https.request(options, (res) => { console.log('STATUS: ' + res.statusCode); console.log('HEADERS: ' + JSON.stringify(res.headers)); res.on('data', function (data) { console.log('data') msg += data; }); res.on('end', function () { console.log('end') resolve(msg) }); }); reqB.write(postData); reqB.on('error', function (e){ console.log('error') msg = e; resolve(msg) }); reqB.end(); }) }
2018-06-12