Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/446.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用带有JavaScript的accuweather API时,console会抛出一个错误_Javascript_Api_Fetch Api_Console.log_Weather Api - Fatal编程技术网

使用带有JavaScript的accuweather API时,console会抛出一个错误

使用带有JavaScript的accuweather API时,console会抛出一个错误,javascript,api,fetch-api,console.log,weather-api,Javascript,Api,Fetch Api,Console.log,Weather Api,这是我在浏览器控制台中收到的错误消息 index.html:1 Access to fetch at <'http://dataservice.accuweather.com/locations/v1/cities/search?apikey=8j7t0np4nHcDaTHN6tXFt4eJc8AWJ2ZT&q=manchester'> from origin <'http://127.0.0.1:5500'> has been blocked by CORS p

这是我在浏览器控制台中收到的错误消息

index.html:1 Access to fetch at <'http://dataservice.accuweather.com/locations/v1/cities/search?apikey=8j7t0np4nHcDaTHN6tXFt4eJc8AWJ2ZT&q=manchester'> from origin <'http://127.0.0.1:5500'> has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

我认为你已经超出了你计划的API请求限制。 在浏览器中粘贴此URL“*时,可以看到以下响应:

{代码:ServiceUnavailable,消息:已超过允许的请求数,。参考:/locations/v1/cities/search?apikey=8j7t0np4nHcDaTHN6tXFt4eJc8AWJ2ZT&q=manchester}