JS fetch TypeError: Failed To Fetch

Whenever I tried to retrieve it, a TypeError was returned: Couldn't find another solution that didn't work for me. Here's my code

fetch(url)
  .then((resp) => resp.json())
  .then((data) => {
     this.JSONData = data;
  })
  .then(() => {
     this.search()
  }) 
  .catch(error => {
     alert(error);
  });

      

+3


source to share





All Articles