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
if (ctx.request.body && typeof ctx.request.body === 'string') { xml = ctx.request.body; } else { // 取原始数据 xml = await getRawBody(ctx.req, { length: ctx.request.length, limit: '1mb', encoding: ctx.request.charset || 'utf-8' }); }
在koa2.0下用的时候
ctx.request.body === 'string'
这个不是string 而是 object
The text was updated successfully, but these errors were encountered:
当 是 text/xml 提交的时候,直接解析成了 Object ?
Sorry, something went wrong.
No branches or pull requests
if (ctx.request.body && typeof ctx.request.body === 'string') {
xml = ctx.request.body;
} else {
// 取原始数据
xml = await getRawBody(ctx.req, {
length: ctx.request.length,
limit: '1mb',
encoding: ctx.request.charset || 'utf-8'
});
}
在koa2.0下用的时候
ctx.request.body === 'string'
这个不是string
而是 object
The text was updated successfully, but these errors were encountered: