I want to test out POST requests using POSTMAN but even for GET request as well as POST, I get 404. I am using it on localhost port 4000 route articles (tried http://localhost:4000/articles as well as *http://127.0.0.1:4000/articles *on POSTMAN) but they both return 404.
//CREATE - POST (App.js code)
app.post("/articles",function(req,res){
console.log(req.body.title);
console.log(req.body.content);
});
Otherwise if I enter the localhost address in the browser, I do GET the response.
I have entered a KEY and VALUE for title and content in the Body > x-www-form-urlencoded in POSTMAN to see it in the console log to check for POST request, but it looks like it does not connect to the link.
(I read about proxy disabling in another answer, which I have disabled now in Settings (the USE SYSTEM PROXY setting) but still no change, do I need to leave the proxy off?).
Any assistance will be appreciated.
Tried sending the POST and GET request but it gives me a 404 error.
http://localhost:4000/articles
I had accidentally hit 'Enter' at the end of the URL on postman. Had to go down and delete the 'new line' and it worked.