Ajax 响应中缺少 http 标头
我遇到 Ajax 响应中缺少一些 http 标头的问题。 ajax 页面 (.NET) 使用 Me.Response.AddHeader("ResponseCode", mResponseCode) 将一些附加信息添加到 http 标头。如果我直接访问 ajax 页面并使用 httpAnalyser 检查标头,我可以看到标头已正确添加。但是当我通过 jQuery 调用 Ajax 页面时,标头丢失了。
我很困惑。有人可以帮助我吗?
此致, 史蒂芬
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在完整或成功方法中,第一个参数是包含此信息的
XMLHttpRequest
对象。您可以像这样检索任何响应标头: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: