I am trying to put an authorization header in my requests but it doesn\'t work.
I am using this:
var config = {headers: { \'Authorization\': token
Try this:
$http({ url : "127.0.0.1/login", method : 'GET', headers : { Content-Type : 'application/json', Authorization: token } }).success(function(data){ alert("login Successfully"); }).error(function(error){ alert("login error"); })