https://i.sstatic.net/v72zp.png
When sending a post request from POSTMAN, req.body contains the data but when submitting the form it returns an empty object {}.
Initially, I used the following middleware:
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false}));
However, I received a deprecation warning for 'bodyParser' indicating that it is outdated. Additionally, a deprecated message was shown.
I attempted to replace it with:
app.use(express.json());
app.use(express.urlencoded({ extended: false}));
Despite this change, the issue still persists with req.body returning an empty object.