nodejs中security.msgSecCheck内容安全监测全返回成功,请问如何写呢?
发布于 6 年前 作者 leichen 14190 次浏览 来自 问答

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 回复

官方可以给一个案例吗,php的也行了,只要可以运行正确就行了,拜托了

回到顶部