有人可以建议我如何通过angularJS
读取set-cookie值Access-Control-Allow-Credentials:true
Access-Control-Allow-Headers:Origin, Content-Type,Accept, Authorization, X-Requested-With
Access-Control-Allow-Methods:POST, GET, PUT, OPTIONS,DELETE, HEAD
Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:Set-Cookie
Access-Control-Max-Age:3600
Cache-Control:private
Content-Length:274
Content-Type:text/html; charset=utf-8
Date:Fri, 18 Jul 2014 15:09:10 GMT
Server:Microsoft-IIS/7.5
Set-Cookie:.ASPXAUTH=874412C6B46506F2CEB94F14CD64288B50FA245EBAE69E5B7EA0B7BD7BCFBA19DC1EBD1A1D96293561B495B7DAD0FE3E8DB5E82B436E9086EB42F06AE141A5DF141B921CD7D8871C697A2C31F3D6E7AE47FA23FDA276AB380DC4E81C6A200D5244808284A7EA02B8B44F9F048D840D57B470B8E3C22D6A9B857189968A68D3B28340DD4C236A65C9BD3A3B25361383BE429003F9A8DD495B2CFE36785EA982558D6017D40109D8DAE3BB3ECBD9124604; path=/
X-AspNet-Version:4.0.30319
X-AspNetMvc-Version:4.0
X-Powered-By:ASP.NET
答案 0 :(得分:0)
我的假设是你正在使用$http
。如果是这样的话,那将是这样的:
$http.get(someServiceUrl).then(function (response) {
var foo = response.headers()['Set-Cookie'];
}