TypeError: Network request failed
来源:5-1 Popular(最热)模块的数据层设计

慕用6205274
2018-03-06
let gitHubUrl = "https://api.github.com/search/repositories?q=javascript&sort=stars&page=1";
fetch(gitHubUrl)
.then((response) => response.json())
.then((responseJson) => {
console.log(JSON.stringify(responseJson));
alert(JSON.stringify(responseJson));
})
.catch((error) => {
console.log(error);
alert(error);
});
写回答
2回答
-
CrazyCodeBoy
2018-03-07
https://api.github.com接口访问是有次数限制的,看一下log是不是接口调用受限
00 -
慕用6205274
提问者
2018-03-06
GET/POST 都不可以 但是用 Fetch 调用有的接口又没有问题
00
相似问题