I’m trying to use ZenQuotes to get a random quote.
When I click on this link: https://zenquotes.io/api/random/
I get redirected to a page with a random quote in it. How can I get this text and put it into JSON in JavaScript?
I found this on a website to do a HTTP request:
const Http = new XMLHttpRequest();
const url='https://zenquotes.io/api/quotes/';
Http.open("GET", url);
Http.send();
Http.onreadystatechange = (e) => {
console.log(Http)
}
However, I’m not sure what I’m looking for.