Last active
September 9, 2017 22:41
-
-
Save sean3z/834c2bdb28b1050a216a975762da9fad to your computer and use it in GitHub Desktop.
Basic fetch example
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
fetch('https://api.chucknorris.io/jokes/random') | |
.then(response => response.json()) | |
.then(body => { | |
console.log(body); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment