Created
July 13, 2025 15:39
-
-
Save davidystephenson/ff451d67a8b6d66fabf2fb306f516c6b 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> | |
console.log('before') | |
async function main () { | |
const uploadData = { message: 'ready' } | |
const uploadJson = JSON.stringify(uploadData) | |
const init = { body: uploadJson, method: 'POST' } | |
// { body: JSON.stringify(uploadData), method: 'POST' } | |
const dogResponse = await fetch('https://dog.ceo/api/breeds/image/random', init) | |
} | |
main() // asynchronous / non-blocking | |
console.log('after') | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment