title: AngularJS $http object not showing all headers from response
body: <p>I'm having a problem with AngularJS's $http service not returning all of the headers from the API I'm polling. Here's what I've got:</p>
  
  <pre><code>$http({
      method: 'POST',
      withCredentials: true,
      url: 'http://api.mydomain.com/query',
      data: JSON.stringify(parameters)
  })
  .success(function(data, status, headers, config){
      ... // setting some scope parameters based on data
      console.log(headers());
  })
  </code></pre>
  
  <p>I can tell through the network tab in Chrome that a bunch of response headers are being returned by the API (I'm particularly interested in the X-Pagination-Total-Items header).</p>
  
  <p>Here's a screenshot of the network tab from the request:
  <img src="https://i.stack.imgur.com/3duig.gif" alt="Chrome&#39;s Network Panel"></p>
  
  <p>But the console.log statement above (which should output all headers) only returns two:
  <img src="https://i.stack.imgur.com/FSjeY.gif" alt="Console Log...missing headers!"></p>
  
  <p>Any idea what's going on? How do I actually access all of the headers coming back from the AJAX call?</p>
  
  <p>Thanks,</p>
  
  <p>-Nate</p>