Created
August 2, 2025 15:42
-
-
Save davidystephenson/9883a0b7612a5ffe5945fde5aa6f1685 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<script> | |
async function upload () { | |
const review = { message: 'Those are some cute dogs!' } | |
const reviewJson = JSON.stringify(review) | |
const init = { | |
method: "POST", | |
body: reviewJson | |
} | |
const response = await fetch('https://dog.ceo/api/breeds/image/random', init) | |
const data = response.json() | |
console.log('data', data) | |
} | |
upload() | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment