instructure / ic-ajax

ember-friendly jQuery.ajax wrapper
MIT License
167 stars 29 forks source link

Cant get all header from response #37

Closed svox1 closed 9 years ago

svox1 commented 9 years ago

I try it with:

ajax.raw('/foo').then(function(result) {
  // result.response
  // result.textStatus
  console.log(result.jqXHR.getAllResponseHeaders())
});

It output only:

Content-Type: application/json
Cache-Control: no-cache

But there are many more headers that I dont get. This is the response:

Date    Sun, 12 Apr 2015 21:07:46 GMT
Cache-Control   no-cache
Access-Control-Allow-Origin http://0.0.0.0:4200
Access-Control-Allow-Credentials    true
Set-Cookie  sid=test-sid; expires=Sun, 12-Apr-2015 23:07:46 GMT; Max-Age=7200; path=/; httponly
Content-Length  139
Content-Type    application/json

And I need the Set-Cookie value.

What I am doing wrong?

svox1 commented 9 years ago

... this seems to be not an issue from ic-ajax