Friday, 4 October 2019

Getting API Data using XMLHttpRequest

<button id='get-btn' onclick='getData()'>GET</button> const getBtn = document.getElementById('get-btn'); const getData = () => {   const xhr = new XMLHttpRequest();   xhr.open('GET''https://reqres.in/api/users/');   xhr.responseType = 'json';   xhr.onload  = () => {     console.log(xhr.response);   }   xhr.send();   } getBtn.addEventListener('click'getData);

No comments:

Setup Windows Local Account without the Internet

During the Windows setup,  On the WiFi screen, press SHIFT + F10  or  FN + SHIFT + F10  This will open the command prompt window with admini...