can someone PLEASE give me some vanilla javascript code that will make a get request to https://api.wasteof.money/posts/64fa845c62c9b104f65962d4/ and display it as an <p> element on screen?
fetch("https://api.wasteof.money/posts/64fa845c62c9b104f65962d4/").then(r => r.json()).then(j => document.querySelector("#the_element").innerHTML = j.content).catch(e => document.querySelector("#the_element").innerHTML = `<p>error: ${e}</p>`)
can you change the catch part to
.catch(e => {
console.dir(e);
document.querySelector("#the_element").innerHTML = `<p>error: ${e}</p>`;
});
and then tell me what’s in the console?