Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

fetch api javascript

fetch('https://apiYouWantToFetch.com/players') // returns a promise
  .then(response => response.json()) // converting promise to JSON
  .then(players => console.log(players)) // console.log to view the response
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #fetch #api #javascript
ADD COMMENT
Topic
Name
4+3 =