指定需要请求的url地址,通过第一个. then得到一个response对象,想要拿到最终数据调用response.json返回一个新的promise,把第一个.then中的promise,return,通过第二个.then就可以处理数据结果

es6中fetch-api

 

相关文章:

  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
猜你喜欢
  • 2021-07-10
  • 2022-12-23
  • 2022-02-06
  • 2021-04-17
相关资源
相似解决方案