Created
January 19, 2024 15:48
-
-
Save StanleyMasinde/c3288a591dea3c713d6deb406547cead to your computer and use it in GitHub Desktop.
XMLHTTP Request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const req = new XMLHttpRequest() | |
req.addEventListener('load', (event) => { | |
console.log(event.target.response) | |
}) | |
req.open('https://jsonplaceholder.typicode.com/posts') | |
req.send() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment