I'm in the process of building a small website for weather forecasting. However, I've encountered an issue when trying to retrieve JSON data from accuWeather - I'm not getting any response. I've double-checked my request and it seems to be fine. Can anyone help me identify what's wrong with my code so I can fix it? Also, if you could provide assistance using Javascript instead of JQuery, that would be great. Link:
This project is part of my Javascript learning journey. The apiKey is public.
<html>
<head>
<meta charset="utf-8"/>
<title>getting</title>
<script>
function start(){
//console.log("asdasd");
var requestURL = "http://dataservice.accuweather.com/locations/v1/cities/search?apikey=BfZGgoA9OaaSy7oyAReezmDFngUe2Lek&q=Annandale&language=en-us&details=true";
var request = new XMLHttpRequest();
console.log(request);
request.open('GET', requestURL);
//console.log(request.response);
}
window.addEventListener("load",start,false);
</script>
</head>
<body>
<div id="loading"></div>
</body>
</html>
Any assistance would be greatly appreciated.