var xhr = new XMLHttpRequest(); xhr.open('GET', 'https://ancientbrain.com', true) xhr.setRequestHeader('content-type', "application/x-www-form-urlencoded") xhr.onreadystatechange = function() { if (xhr.readyState == 4) { console.log(JSON.parse(xhr.responseText)); } } xhr.send()