So I am trying to build a restify backend to answer these Angularjs calls. The problem is that angular sends the data via Request Payload (Chrome Dev Tools | no idea what that is).
Angularjs call:
var userDetails = {
username:"username",
password:"password"
}
$http.post('http://localhost:8080/login',userDetails,{}).success(function(data){});
As far as I know with restify I can only access data saved in the URL
http://localhost:8080/login/username/password
Here I would just use:
server.post("/login/:username/:password", function(req,res,next){
console.log(req.params);
});
But how can I access the Request Payload?
If that is not possible can I get Angular to make the calls to fit restify.