In KrakenJs, I found a workover to make POST/PUT/DELETE requests without turning off "csrf" by passing a "_csrf" parameter in the body
In index.dust ->
<input id="csrfid" type="hidden" name="_csrf" value="{_csrf}">
In myScripts.js ->
var csrf = document.getElementById('csrfid').value;
$http({ method: 'POST',
url: 'http://localhost:8000/myRoute/',
data: { '_csrf': csrf, 'object': myObject }
}).success(function(result) {
//success handler
}).error(function(result) {
//error handler
});
It works with POST/PUT requests flawlessly. But when I try to make DELETE it fails with 500
However I have tried jQuery DELETE and that worked fine... The problem is with AngularJs... Anybody encountered it earlier?