Skip to content

Instantly share code, notes, and snippets.

@jaydson
Created March 8, 2021 16:45
Show Gist options
  • Save jaydson/c5ec48552125e7b1ff0d1f88e4a43e73 to your computer and use it in GitHub Desktop.
Save jaydson/c5ec48552125e7b1ff0d1f88e4a43e73 to your computer and use it in GitHub Desktop.
const URL_TO_FETCH = 'https://braziljs.org/api/list/events';
fetch(URL_TO_FETCH, {
method: 'get' // opcional
})
.then(function(response) {
// use a resposta
})
.catch(function(err) {
console.error(err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment