-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
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
Not working with Firebase Functions #127
Comments
I created a small middleware function to support already parsed bodies: function hybridBodyParser (opts) {
const bp = bodyParser(opts)
return async (ctx, next) => {
ctx.request.body = ctx.request.body || ctx.req.body
return bp(ctx, next)
}
} Usage: app.use(hybridBodyParser()) |
@dead-horse, @niftylettuce |
I am strongly against using anything like Firebase. It is up to @dead-horse on this. |
Using this on firebase does not make any sense since it'll not do anything. Firebase does it already. |
Submit a PR for review |
I have added a new option |
I would say, we published @koa/bodyparser v5 a few minutes ago. So you can now use the |
This is really puzzling because you can't really figure out why it's giving a Timeout.
No errors or warnings.
Fortunately, I stumbled upon this stackoverflow question: https://stackoverflow.com/questions/58237305/post-request-hangs-timeout-when-trying-to-parse-request-body-running-koa-on-f
And according to the solution written there:
Shouldn't this package handle the said problem?
EDIT:
I mean at least a warning to prevent confusion if it can't do it. It doesn't make sense to use this package if the body is already parsed wouldn't it?
The text was updated successfully, but these errors were encountered: