[英]Unable to response headers from a jquery getJson call besides content-type and cache-control
I'm doing a getJson call with jquery like this 我正在用这样的jquery进行getJson调用
jQuery.getJSON("api.url.com/resource", function(result, status, hxr) {
console.log(hxr.getAllResponseHeaders());
console.log(hxr.getResponseHeader('link'));
});
I'm only getting for hxr.getAllResponseHeaders() 我只想要hxr.getAllResponseHeaders()
content-type: application/json; charset=utf-8
cache-control: public, max-age=60, s-maxage=60
hxr.getResponseHeader('link') is showing null, hxr.getResponseHeader('link')显示为空,
What am I doing wrong to get the other response headers This are all the headers that I'm getting for the request 获取其他响应标头时我在做什么错这是我为请求获取的所有标头
Access-Control-Allow-Origin:*
cache-control:public, max-age=60, s-maxage=60
connection:close
content-length:8426
content-type:application/json; charset=utf-8
Date:Mon, 03 Mar 2014 23:38:22 GMT
etag:"c1b72eda189b91dd6ea837bd5e83c02a"
link:<http://api.url.com:80/v1/df?page=1>;rel="first">
Set-Cookie:connect.sid=s%3AG0eH5GaXlPq5Dc7onmNY3hGF.V%2Brv9d8DFjXXeI%2F5v9rATeTp%2FUcCxyPWScCDPiINJgY; Path=/; HttpOnly
status:200
Aditional Notes: 附加说明:
您无法在跨域调用中访问标头信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.