Answers for "console log fetch response"

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
0

fetch log api response time

console.time("timer1");
      fetch('https://jsonplaceholder.typicode.com/posts/1')
  .then((res) => {
    return res.json();
  })
.then((data) => {
  console.timeEnd("timer1");
Posted by: Guest on February-10-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language