Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
async function callApi() {
const response = await fetch("...");
const greeting = await response.text();
console.log(greeting);
}
callApi()
fetch('...')
.then((response) => response.json())
.then((data) => {
console.log(data)
})
const response = await fetch('...')
const data = await response.json()
console.log(data)
export {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment