We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
版本:2.9.43 node: 18 请求类型:POST body中数据请求格式:x-www-form-urlencoded
const { req, res, headers,body } = ctx; exports.handleRequest = async (ctx, request) => { const client = req.request(async (svrRes) => { res.writeHead(svrRes.statusCode, svrRes.headers); console.log(ctx.req.body,req.body); //这样得到不到数据 // 省略修改body代码 svrRes.pipe(res); }); req.pipe(client); });
使用事件监听可以获得
req.on('data',buffer=>{ console.log(buffer.toString()); })
主入口是否缺少 require('body-parser') 模块导致无法解析?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
版本:2.9.43
node: 18
请求类型:POST
body中数据请求格式:x-www-form-urlencoded
使用事件监听可以获得
主入口是否缺少 require('body-parser') 模块导致无法解析?
The text was updated successfully, but these errors were encountered: