When attempting to parse body parameters in the post
method, I am facing an issue where the email field is empty:
app.post('/v1/authorizeUser', async (req, res) => {
console.log(req);
const { email, password } = req.body;
The following is the output from the log:
body: [Object: null prototype] {}
This is the request I am sending:
https://i.sstatic.net/KJaA8.png
According to the documentation, there should be no need to import body-parser
using npm i
. What could be causing this issue?