Answers for "browser fetch javascript example"

19

fetch api javascript

fetch('http://example.com/movies.json')
  .then((response) => {
    return response.json();
  })
  .then((myJson) => {
    console.log(myJson);
  });
Posted by: Guest on February-10-2020
2

.fetch method

fetch('http://example.com/data.json')
  .then(data => data);
  .catch(err => console.log(err));
Posted by: Guest on November-09-2020

Code answers related to "browser fetch javascript example"

Code answers related to "Javascript"

Browse Popular Code Answers by Language