Created
June 11, 2018 23:57
-
-
Save alexpaul/149811beae237a37cfac84fceca4d45f to your computer and use it in GitHub Desktop.
Using Javascript's Fetch API to make a GET request
This file contains hidden or 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('YOUR ENDPOINT HERE') | |
| .then(response => response.json()) | |
| .then(jsonData => console.log(jsonData)) | |
| .catch(err => console.error(err)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment