简体   繁体   中英

Missing http header in Ajax response

I'm having an issue with some missing http headers in a Ajax response. The ajax-page (.NET) adds som additional info to the http header by using Me.Response.AddHeader("ResponseCode", mResponseCode). If I access the ajax-page directly and use httpAnalyser to check the headers, I can see that the headers are added correctly. But when I call the Ajax page through jQuery, the headers are missing.

I'm puzzled. Anyone out there that can help me?

Best regards, Steffen

In your complete or success method the first parameter is an XMLHttpRequest object that contains this information. You can retrieve any response header like this:

xmlHttpRequest.getResponseHeader('header-name');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM