1var xhr = new XMLHttpRequest();
2xhr.open("GET", "https://reqres.in/api/products/3", true);
3xhr.onload = function(){
4 console.log(xhr.responseText);
5};
6xhr.send();
7
1var xhr = new XMLHttpRequest();
2xhr.open("GET", "www.carimagery.com/api.asmx/GetImageUrl?searchTerm=corolla", true);
3xhr.onload = function(){
4 console.log(xhr.responseText);
5};
6xhr.send();
7