AJAX native example
var xhttp=new XMLHttpRequest();
xhttp.onreadystatechange = function(){
if (this.readyState==4){
if (this.status==200){
document.getElementById("output").innerHTML = this.responseText;
}
}
}
xhttp.open("GET","https://jsonplaceholder.typicode.com/posts/1");
xhttp.send();