Get HTTP-only cookie from Windows 8 JS App

2020-04-21 04:24发布

I am making a Javascript Windows 8 app in which the user connects to my server and logs in. Currently, I am trying to use the XmlHttpRequest Object to do so (specifically, WinJS.xhr) but when I get the output of getAllResponseHeaders(), the Set-Cookie header isn't there (because it is an Http-only cookie).

Is there any way to get http-only cookies from a JS Windows 8 app?

All help is greatly appreciated and I always accept an answer!

1条回答
我欲成王,谁敢阻挡
2楼-- · 2020-04-21 04:49

As it turns out, Windows 8 apps are already able to get HTTP-only cookies with the XMLHttpRequest from the response's header. However, the system handles the cookies automatically in the same way iOS does. This seems very logical, since the coder should not be responsible for cookie handling, the underlying framework does that.

查看更多
登录 后发表回答