mrowlsss @mrowlsss

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?

Sep 8, 2023, 3:17 AM
15
View all Parent

comments

Highlighted comment

TypeError: Failed to fetch

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?