Quantcast
Channel: Express.js req.body undefined - Stack Overflow
Viewing all articles
Browse latest Browse all 54

Answer by Anmol Pal for Express.js req.body undefined

$
0
0

Use either of the two:

  1. app.use(express.json());

  2. app.use(bodyParser.json());

Incase of the 2nd option.

npm i body-parser

const bodyParser = require("body-parser");


Viewing all articles
Browse latest Browse all 54

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>