Is there a way to send POST variables to a RESTful API using an angularjs service?
I currently have the following setup:
angularjsServices.factory('LoginService', [ '$resource',
function($resource){
return function(user, pass){
return $resource(baseURL + "/login", {}, {
logIn: {method:'POST', params:{username: user, password: pass}, isArray:false}
});
}
}]);
As it stands, the variables are being sent in the URL. (I found inspiration from this tutorial, although it uses jQuery instead of angularJS.)