Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js fetch

fetch('https://pokeapi.co/api/v2/pokemon/').then(function (response) {
  return response.json(); // This returns a promise!
}).then(function (pokemonList) {
  console.log(pokemonList); // The actual JSON response
}).catch(function () {
  // Error
});
Source by careerfoundry.com #
 
PREVIOUS NEXT
Tagged: #js #fetch
ADD COMMENT
Topic
Name
6+9 =