Skip to content

Instantly share code, notes, and snippets.

@hackintoshrao
Created September 21, 2021 21:54
Show Gist options
  • Save hackintoshrao/87b8edf2ef7e8cbf35c23843d9de9572 to your computer and use it in GitHub Desktop.
Save hackintoshrao/87b8edf2ef7e8cbf35c23843d9de9572 to your computer and use it in GitHub Desktop.
const response = await fetch('https://example.com/movies.json');
const data = await response.json();
// Remember: Astro component scripts log to the CLI
console.log(data);
---
<!-- Output the result to the page -->
<div>{JSON.stringify(data)}</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment