Is there anything wrong with my JSON request? (Weather App)

Can someone please tell me what is wrong with this? My console gives me this error and it’s the most aggravating feeling:

VM2499 jquery.min.js:4 GET… 404 ()

 var url = '';      
            console.log("url " + url);
            $.getJSON(url, function(data){

This is my codepen url:

Thank you!

Looks like your url is missing a protocol. http:// or https://

Without this, requests you make will be appended to the end of where your code is being run. You can see that your error message shows the codepen URL combined with your openweathermap url.

1 Like

Yes, I realized everyone’s codepen was not working if they used the openweathermap. Thank you for your help! My project is finally making progress!

1 Like