Skip to content

Instantly share code, notes, and snippets.

@keevie
Created January 30, 2024 17:28
Show Gist options
  • Save keevie/678444e746c032ced8b29f7a1ded7dc1 to your computer and use it in GitHub Desktop.
Save keevie/678444e746c032ced8b29f7a1ded7dc1 to your computer and use it in GitHub Desktop.
const getUrl = async(url) => {
const resp = await fetch(url, {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
method: 'GET',
});
const res = resp.json();
return res
}
const main = async () => {
const res = await getUrl('https://warbler.frameable.com/api/healthcheck')
console.log( res)
}
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment