Skip to content

Instantly share code, notes, and snippets.

@jaydson
Created Mar 8, 2021
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