JS fetch TypeError: Failed To Fetch

Whenever i tried to fetch it returned an error TypeError:failed to fetch others solution doesnt to 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);
  });

posted on 2021-06-16 23:20  漫思  阅读(3194)  评论(0编辑  收藏  举报

导航