0
我确定这是我在阅读API文档时错过的东西 - 我试图在jquery中硬编码请求来调用openweather API,因为该页面是地理特定的:Openweather API拒绝连接
console.log('Connected to Script.js');
$(document).ready(weatherSettings);
function weatherSettings() {
var config =
{
url: 'https://api.openweathermap.org/forecast',
data: {
id:'7281804',
appid: 'MYID'
}
};
$.ajax(config).done(displayMelbourneData);
function displayMelbourneData(callback) {
console.log(callback);
}
}
但是我得到的错误是:净:: ERR_CONNECTION_REFUSED,我不能为我的生活弄清楚为什么。
任何帮助,将不胜感激。