Closed vishivish18 closed 7 years ago
You should check to make sure you are not using Post on any other app on your local device computer or sandbox for that matter. I would reset my terminal/commandline and try again.
add the following piece
app.use(bodyParser.urlencoded({extended: true}));
before
app.use(bodyParser.json());
it resolved my issue using postman
Try these settings:
@warhost I even forgot about this thing , I had this issue long time back, but thanks for your reply though, I appreciate it 👍 I am closing this now
After changing server.js to listen to listento q post request on http://localhost:3000/api/posts and defining the model it is still giving an error in postman I am sending key value pair in post man as below image (if i am removing the required condition from username and body then its saving an empty data in the collection)