WebIntermediate

XMLHttpRequest

Also known as XHR

A browser API for making HTTP requests and receiving responses through events, widely used before Fetch became common.

In the real world

const xhr = new XMLHttpRequest(); xhr.open('GET', '/api/terms'); xhr.onload = () => console.log(xhr.responseText); xhr.send();

Related

Go a little deeper