AngularJS $http Response Header


Answer :

You should use: headers('X-TotalPages')

(Posting Wawy's answer so the question can be resolved.)


For $http(url).then() syntax which replaced $http(url).success().error() in newer versions of AngularJS, I used this:

$http(url).then(function(response){             response.headers("X-TotalPages");      }); 

Just using response.headers() will give all headers attached in response.


Comments

Popular posts from this blog

Chemistry - Bond Angles In NH3 And NCl3

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?