Skip to content

Instantly share code, notes, and snippets.

@jaydson
Created March 8, 2021 16:45
Embed
What would you like to do?
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