javascript - Answering Angular requests with restify -


so trying build restify backend answer these angularjs calls. problem angular sends data via request payload (chrome dev tools | no idea is).

angularjs call:

var userdetails = {    username:"username",    password:"password" } $http.post('http://localhost:8080/login',userdetails,{}).success(function(data){}); 

as far know restify can access data saved in url

http://localhost:8080/login/username/password 

here use:

server.post("/login/:username/:password", function(req,res,next){     console.log(req.params); }); 

but how can access request payload?

if not possible can angular make calls fit restify.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -