The Question of Automatic Reply to WeChat

  node.js, question

When WeChat fans send me text, WeChat sends post requests on my interface and carries xml data. I parse and return a text in the getMsg module;
clipboard.png
The following is the getMsg module;
clipboard.png
The following is the printed xml (I will send it to WeChat res.end(data))
clipboard.png

The result still did not return the result;

clipboard.png

But when I debug on the debugging tool, I can return the result.

clipboard.png

Online, etc

This problem has been solved.
clipboard.png
There are two situations here.
1. Fans Send Messages to Wechat Official Account;
The xml case is tousername // username of Wechat Official Account

Fromusername // username of fans

2. Wechat Official Account’s Feedback to Fans;
The xml case is tousername // username of fans

Fromusername // username of Wechat Official Account
 So say;  When returning to fans, this one needs to be replaced.