使用带有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}