Javascriptfunction request() { var req = new XMLHttpRequest(); req.onreadystatechange = function() { if (req.readyState === 4) { console.log(req.getResponseHeader("Location")); console.log(req.responseText) } req.open("GET", "http://*************", true); req.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); req.send(null);