angularjs - Angular $http doesn't turn all response headers -


I would like to receive the 'X-total-count' response title of a raceipul API. Trying to get the header in the query callback function of my NgrSource 'user', it seems that $ http ignores several repost headers.

This is the answer header for my request:

  Access-control-permission-origin: * cache-control: max-age = 0, personal, re-modify Connection: Close Content-Encoding: gzip Content-Type: Application / Jason; Charset = utf-8 Date: Fri, 17 October 2014 11:13:26 GMT Link: & lt; Http: //xxxx.xxx/user? Page = 2>;  

Here I ask the set of users:

  User.query ({Page: $ scope.pagingOptions.currentPage, range: $ scope.pagingOptions .pageSize}, function (user, feedback header) {console.log (responseHeaders ()); console.log (responseHeaders ('x-total-count')););  

The result of this console is:

  object {cache-control = "max-age = 0, personal, required-modify", content- Type = "Application / Jason; Charset = UTF-8"} Empty  

So why $ http's answer handler () function only creates 2 of the 10 header properties?

Are you sure you are not sharing cross-off resources?

View

This specification is a simple feedback header field (i.e. cache-control, content-type, ...)

, and restricts access to any feedback header field.

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -