版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/qq_32768743/article/details/88959001
走了xhr,来了fetch
fetch用起来还是挺简单的,
我需要简单的拿一个json数据
可以写成
fetch("https://api.github.com/search/issues?q=author:PikachuHy+type:pr")
.then(res => res.json())
.then(data => {
// other ops
})