Do I need to set up any configuration before I can make DELETE requests to a node.js application?
I can make GET
, POST
or PUT
requests, but DELETE
requests won't work.
DELETE http://localhost:8081/api/1.0/entry
yields undefined
from the routing logger, I'm using express to register the routes. But it looks like I can't even resolve the url / verb.
This is how I'm invoking it:
rows.find('a.remove').on('click', function(){
$.ajax({
url: '/api/1.0/entry',
type: 'DELETE'
}).done(function(res){
var row = $(this).parentsUntil('tbody');
row.slideUp();
});
});
Sample log
GET / 200 18ms
GET /author/entry 200 10ms
GET /api/1.0/entry 200 2ms
GET /api/1.0/entry 200 1ms
GET /api/1.0/entry 200 1ms
undefined