Repository navigation
Undocumented change between 5.0.0-alpha.8 and 5.0.0-beta.1 with req.body #4909
|
Hello Everyone! I am testing my REST API with 5.0.0-beta.1 and found that the req.body object after
is undefined when an http request with Content-Type application/json without a body is received. With 5.0.0-alpha.8 req.body is an empty object and this behavior conforms with the express.json() API reference (https://expressjs.com/en/5x/api.html). Is this a bug or something to be considered for the future? |
Answered by
dougwilson
May 17, 2022
Replies: 1 comment
|
Sorry about that! Yes that is intentional. You can find it listed in the change log https://github.com/expressjs/express/blob/v5.0.0-beta.1/History.md#500-beta1--2022-02-14 as
It looks like the docs on expressjs.com where not updated to reflect that. We can get that updated. |
0 replies
Answer selected by
jassenjj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry about that! Yes that is intentional. You can find it listed in the change log https://github.com/expressjs/express/blob/v5.0.0-beta.1/History.md#500-beta1--2022-02-14 as
It looks like the docs on expressjs.com where not updated to reflect that. We can get that updated.