Skip to content Skip to sidebar Skip to footer

Req.body Is Undefined Mean App

I have an issue on my app. The simple way to tell you whats the problem let mme show you my code var Meetup = require('./models/meetup'); module.exports.create = function (req,

Solution 1:

If req.body is undefined then you need to:

  • make sure you use the body-parser on the backend
  • make sure you pass the correct data on the frontend
  • make sure that the data passed by your frontend is in the correct place (body)
  • make sure that the data is in the correct format (JSON? URL-encoded?)
  • open the Network tab in the developer console of your browser and see what is transferred

See one of the answers to your own questions for more details:

Post a Comment for "Req.body Is Undefined Mean App"