Nodejs wechat group message content newspaper empty content

  node.js, question

T T asks the great god. .
Background:

1. WeChat Test Number
 2. WeChat group sending interface, text message

clipboard.png

3. English numbers can be sent successfully, but sending Chinese messages (one word can be T T, more than one word of Chinese will be reported as an error) will be reported as an error.
 errcode 44004 errmsg empty content hint WxrcNA0859age8

clipboard.png


Code:

/**
 * Created by hh on 2016/6/28.
 * 消息推送
 */
var http = require("http");
var https = require("https");
var url = require("url");
var request = require("request");
var needle = require("needle");
var access_token;
http.createServer(function(req, response) {
    response.writeHead(200, {"Content-Type": "text/plain" ,"Access-Control-Allow-Origin":"*"});

    getServise("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=SECRET",
        function(data){
            access_token = JSON.parse(data).access_token;
            var txt = "00我想我想我想吃东西";
            postCode( {
                "touser":["oi7M0wpwce27aR-8vioIg1zMjS5I","oi7M0wpvv57bKIqqJUuR3JBVb_eA"],
                "msgtype": "text",
                "text": { "content": txt}
            },access_token);

        });
    //response.end();

}).listen(8008);

//get方法
function getServise(url,callback){
    var req = https.request(url, function (res) {
        //console.log('STATUS: ' 加 res.statusCode);
        //console.log('HEADERS: ' 加 JSON.stringify(res.headers));
        res.setEncoding('utf8');
        res.on('data', function (chunk) {
            console.log('BODY: ' 加 chunk);
            callback(chunk);
        });
    });

    req.on('error', function (e) {
        console.log('problem with request: ' 加 e.message);
    });

    req.end();
}
//post方法
function postCode(data,access_token) {
    // Build the post string from an object
    var post_data = JSON.stringify(data);
    // An object of options to indicate where to post to
    var post_options = {
        host: 'api.weixin.qq.com',
        port: '80',
        path: "/cgi-bin/message/mass/send?access_token="加access_token,
        method: 'POST',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
            'Content-Length': post_data.length
        }
    };

    // Set up the request
    var post_req = http.request(post_options, function(res) {
        console.log(typeof post_data);
        res.setEncoding('utf8');
        res.on('data', function (chunk) {
            console.log('Response: ' 加 chunk);
        });
        res.on('error', function (e) {
            console.log('eeeee: ' 加 e);
        });
    });


    // post the data
    post_req.write(post_data);
    post_req.end();
}

I’ll give you a friendly reminder of why your appid was released.