So, supposed i have this link in my ejs file :
<a href="/user/12">Delete</a>
And in my route file, i have delete code like following :
router.delete( '/user/:id', function ( req, res ) {
// delete operation stuff
});
So my question is, how i can override GET
request from link into DELETE
method to ensure my router.delete
route able to handle it. Right now, its only detect the request as a GET
. I'm using this Method Override module to handle it, But seems like all of examples were using form element, not the anchor way. Anyone?