Created
March 23, 2019 21:09
-
-
Save graciano/c12192e9c9d01497249d7ab2ba1bad4f to your computer and use it in GitHub Desktop.
quick example of fetch api with swapi
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
let apiResponse = await fetch('https://swapi.co/api/people/1') | |
let swCharacterObject = await apiResponse.json() | |
console.log(swCharacterObject.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment