我试用fetch 从服务端请求简单数据。如下:
fetch(url).then(function(response) {
console.log(response.status); // 200
});
但是再response里面没有返回服务端的数据,而且是先输出状态码200,再Fetch
complete。
在Fetch complete的时候可以获取到服务端返回的数据。这是神马情况呢,怎么catch到Fetch complete状态。求教大神帮忙。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
不懂这是不是你想要的结果
//app.js
https://segmentfault.com/q/10...