Answers for "what is an xhr request"

0

xhr request

var url = "https://example.com/";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
Posted by: Guest on June-11-2021
1

what is xhr

XMLHttpRequest (XHR) is a JavaScript API to create AJAX requests. Its methods provide the ability to send network requests between the browser and a server
Posted by: Guest on May-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language