当我使用检查器查看请求时,我的http响应包含头文件Authentication(如此处所述:Authentication:76efbc0946773b62c93e952b502a47acd898200f6f80dc46ac87ffc501c00780
),但对headers("Authentication")
的调用返回null
return $http({
method: "GET",
url: url,
headers: {
'Content-Type': "application/json"
}
}).success(function (data, status, headers, config) {
console.log(headers("Authentication"));
})
你有没有想法,我可能做错了什么?
顺便说一下,我尝试着改回 "promise" 的方式,使用 .then
,但问题仍然存在。