使用 API并尝试从这个端点https://www.freetogame.com/api/game?id=${number}获取动态数据,最后得到CORS错误。更新:I使用了错误的API(),我应该使用这个API,它修复了CORS错误(实际上我没有安装任何库或依赖项,也没有添加代理)。谢谢大家的支持!误差 Access to fetch at 'https://www.freetogame.com/api/game?
为此,我偶然发现了免费的API源代码:https://rapidapi.com/visual-crossing-corporation-visual-crossing-corporation-default/api/visual-crossing-weather/ 但是,在使用所提供的代码和示例时,我得到了错误: {"message":"Invalid API key.Go to https:\/\/docs.<e