I have api that required parameter in body, so I need to put that values in restangular, I have tried this
function deleteAccount(){
$log.log(accountIdDelete);
Restangular.one(apiDeleteAccount).customDELETE(
undefined,
[
{id : accountIdDelete},
{ContentType:'application/x-www-form-urlencoded'}
]).then(function(response){
$log.log(response);
var index = vm.account.indexOf(accountIdDelete);
if (index > -1) vm.account.splice(index, 1);
$('#deleteAccount').modal('hide');
});
}
What I'm trying is basicly tried to delete the data using id, I need that data Id put it in body request so that the api can detect select the data and delete it. but the code above that doesn't pass the value to the server? is there any way to put request body in restangular?