-
-
Notifications
You must be signed in to change notification settings - Fork 728
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
Empty req.body with json parser #264
Comments
This module is currently version 1.18.1, very different from the version you mentioned. Is that just a typo? |
@dougwilson sorry I wrote 1.0.1 by error, I mean lastest version 1.18.1. If I install the last version the body is always empty. If I downgrade to 1.0.0 everything works. |
Downgrade what to 1.0.0, this module? The code you provided is working for me with your jQuery code in both 1.0.0 and 1.18.1 |
Sorry, I made a typo when rewriting your jQuery. The issue is your content typs is invalid. Instead of
It needs to be
|
@dougwilson I try to explain it better. I was using [email protected], I have upgrade it to 1.18.1 (the last version), after the upgrade I had empty body in req.body so I have downgrade body-parser back to 1.0.0 and things started working again. I still don't understand why it works with 1.0.0, was a bug in 1.0.0 version that made it work even with the ';' at the end of content type string or what else? |
That's correct, it was a bug that was fixed. |
Thanks @dougwilson. I have removed that ';' from all jquery requests in my project and now everyting works with lastest version 1.18.1. |
After the update from version 1.0.0 to 1.18.1 req.body is empty.
Request:
Server side init:
The text was updated successfully, but these errors were encountered: