Basic Node and Express - Get Data from POST Requests

I do not know what is the reason why I get {“name”:“undefined undefined”} when I use
app.post(“/name”,function(req,res){
res.send(req.body);
});. I use https://boilerplate-express-2.aaronargotte.repl.co/name as endpoint and I only get {“name”:“undefined undefined”}

Describe your issue in detail here.

Your project link(s)

solution: boilerplate-express-2 - Node.js Repl - Replit

Your browser information:

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

Challenge: Basic Node and Express - Get Data from POST Requests

Link to the challenge:

Works fine for me if I fill out the form.

1 Like

I think the reason may be that your not posting data on the post request.

1 Like

How can I do that? :0

Well just fill out the form.