Basic Node and Express - Get Data from POST Requests

Tell us what’s happening:

app.route(“/name”)
.get((req, res) => {
const first = req.query.first;
const last = req.query.last;
res.json({ name: ${first} ${last} });
})
.post((req, res) => {
//Another way to do it:
const string = req.body.first + " " + req.body.last;
res.json({ name: string })
}); j’ai erreur les noms ne sont pas correctes

###Your project link(s)

solution: http://localhost:3000

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Challenge Information:

Basic Node and Express - Get Data from POST Requests