I am sending a key through DELETE method but the method seems inappropriate. Any clue what I am missing ? The function runs but the it does not work
$scope.delete = function(id) {
if (confirm("Are you sure you want to delete the user") === true) {
$http({
method: 'DELETE',
url: 'http://abc.dev/users/user/' + id,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
.success(function(data) {
$scope.singleuser = data;
console.log("function single user is processed");
})
.error(function(data) {
console.log('error');
});
} else {
console.log("no");
}
};
deletemethods? Do you get a 403 response?