收藏
回答

nodejs中security.msgSecCheck内容安全监测全返回成功,请问如何写呢?

request({

        method: 'POST',

        url: `https://api.weixin.qq.com/wxa/msg_sec_check?access_token=${access_token}`,  

        // body: JSON.stringify({"content": encodeURIComponent(content)}),   //只会转义非英文字符  UTF8的字节码    把unicode转utf-8

        body: JSON.stringify({"content": `${encodeURI(content)}`}), 

        headers: {

            "content-type": "application/json; charset=UTF-8",

        },

      }, function (errresponsebody) {

        console.log(22222222,errbody)

        if (errdeferred.reject(err);

        deferred.resolve(JSON.parse(body));

      })


回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签