i want to set Headers in my Request and send it to my localServer.
I don't know if i'm doing it right.
function LoginCtrl($scope,LoginService, $resource) {
$scope.login = function (id,password) {
var UserStatus = $resource('/nancy/api/login/', {},
{'Login': {method: 'POST',isArray: false,headers:{'id':id,'pass':password}}
});
$scope.Loginstatus = UserStatus.Login({ Benutzer: id, Password: password}, function () {
$scope.response=$scope.Loginstatus.status;
});
};
}
LoginCtrl.$inject = ['$scope','LoginService','$resource'];
i set the headers where i define the action. is this right or did i forget anything?