Hi, I assume on browser we can access/read current page’s header information using following API:
js.html.Headers - Haxe 4.3.4 API
Additionally, I’m trying to find how to use Cookie API in Haxe/JS:
js.Cookie - Haxe 4.3.4 API
Currently, I can read browser headers in following way - but this do not gives me ability to access the value in Headers way but string:
var htmlWindow = cast(js.Lib.global, Window);
var req = new XMLHttpRequest();
req.open('GET', htmlWindow.document.location.href, true);
req.send(null);
req.onload = function() {
var headers = req.getAllResponseHeaders().toLowerCase();
trace(headers);
};
Same way, I can access cookies by writing following, but that do not able me to access the value in Cookie API way:
trace(htmlWindow.document.cookie);
Any help would be very appreciating. Thank you.