DEV Community

Discussion on: Get HTTP request body data using Node

Collapse
 
rxbsxn profile image
Robert Harężlak

This fragment of code will not work, because you are using undefined variable

app.post('/endpoint', (req, res) => {
  console.log(request.body.todo) // Replace request -> req
})
Collapse
 
flaviocopes profile image
flavio ⚡️🔥

Good catch, thanks!