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,我不能爲我的生活弄清楚爲什麼。
任何幫助,將不勝感激。