Created
March 19, 2023 14:38
-
-
Save bugeyemonster/5c2738b91d1de8eed68094442c27d50d to your computer and use it in GitHub Desktop.
JS Fetch
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('https://example.com/data.json') | |
| .then(response => response.json()) | |
| .then(data => console.log(data)) | |
| .catch(error => console. Error(error)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment