PDA

View Full Version : the response for Ext.Ajax.request doesn't include all response headers



aceyin
10 Aug 2014, 12:50 AM
hi, i am using Ext.Ajax.request for posting data to backend server.
but i found the response object in the "success" callback function doesn't include all the headers returned by the server.

see the enclosed image for example:

here is the responses returned from server:
49925

but when call : response.getAllResponseHeaders(), it only return 'content-type' header:

49926

what's the reason? and how i can get other headers?

skirtle
10 Aug 2014, 3:01 PM
It's nothing to do with ExtJS, it's the standard behaviour for CORS.

See Access-Control-Expose-Headers:

http://www.html5rocks.com/en/tutorials/cors/

aceyin
10 Aug 2014, 5:51 PM
Hi Skirtle, thank you very much ~~

i will try Access-Control-Expose-Headers later ~~