Created
March 8, 2021 16:45
-
-
Save jaydson/c5ec48552125e7b1ff0d1f88e4a43e73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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