xxxxxxxxxx
var xhr = new XMLHttpRequest();
xhr.open("GET", "https://reqres.in/api/products/3", true);
xhr.onload = function(){
console.log(xhr.responseText);
};
xhr.send();
xxxxxxxxxx
fetch('https://dummyjson.com/products/1')
.then(res => res.json())
.then(console.log);
Hide Output
xxxxxxxxxx
var xhr = new XMLHttpRequest();
xhr.open("GET", "www.carimagery.com/api.asmx/GetImageUrl?searchTerm=corolla", true);
xhr.onload = function(){
console.log(xhr.responseText);
};
xhr.send();
xxxxxxxxxx
(custom-set-variables '(cua-mode t nil (cua-base)))