recently I am learning the development of Wechat public platform. The sentence koa2.0,ctx.body = "success" is correctly returned to Wechat at the comment, and the callback function can be executed but cannot be received by Wechat.
let fn_getInfo = async(ctx, next) => {
let reqString = "";
ctx.req.on("data", (chunk) => {
reqString += chunk;
});
ctx.req.on("end", () => {
const xml2js = require("xml2js");
xml2js.parseString(reqString, { explicitArray: false }, (err, result) => {
console.log(JSON.stringify(result));
ctx.body = "success";
});
});
//ctx.body = "success";
}