getting post parameters from expessjs



This is pretty straight forward. If you're using express 4.16, all you need to do is :-



app.use(express.json());

Then somewhere in your code :-



// create user
router.post('/create', (req: Request, res: Response) => {
console.log(req.body);
// Greet the given name
res.send(`create`);
});

Comments

Aravindhan H said…
CodingCub provides the best Software Testing Course in Chennai with a restriction to batch size to make sure that we can provide attention on each and every individual and help them to learn Software testing in-depth.

Popular posts from this blog

PySpark - Working with JDBC Sqlite database