express-post-json Flashcards

1
Q

What does the express.json() middleware do and when would you need it?

A

parses incoming request with json payload and is based on body-parser. Where is the actual data? BODY!!!! (header/blank line/body) —> it looks for the json data in the body. Will send empty object if the JSON wasn’t sent correclty.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly