I am writing a To-Do List application on AngularJs, the application should have the ability to delete tasks. To do this, I need to send an appropriate request to the server from the application, but I get the status 404, while through the postman extension the status of the request comes 200. GET request with applications to the server to get the collection of all tasks passes without problems.
Request Code:
deleteTask: function (task) { $log.log(task._id); $http({ method: 'DELETE', url: 'http://localhost:3005/api/tasks/' + task._id, headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }).then(function successCallback(response) { $log.log(response); }); } Screenshot of the request from the application:
Screenshot of request from Postman extension: 