Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

fetch

const options = {method: 'GET', headers: {Accept: 'application/json'}};

fetch('https://api.test.com/data/id', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #fetch
ADD COMMENT
Topic
Name
8+4 =