Skip to content
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

raw empty if Content-Type application/json #11

Closed
telcy opened this issue Jun 29, 2018 · 0 comments
Closed

raw empty if Content-Type application/json #11

telcy opened this issue Jun 29, 2018 · 0 comments
Assignees

Comments

@telcy
Copy link

telcy commented Jun 29, 2018

I am having the same problem like described in this post https://forum.adonisjs.com/t/using-stripe-webhook-problem-with-incoming-request/135

https://github.com/adonisjs/adonis-bodyparser/blob/5f566014b39c4f9ce26655a01b3f829cf976f00f/src/BodyParser/index.js
This script returns at the first match which is json (because of Content-Type application/json) and skips setting the raw part.

In some cases, you want to parse the raw part of a json request as well to validate signatures etc.

I think the raw part should always be set whatever Content-Type it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants