SwitchUp SwitchUp Ranked Best Coding Bootcamps 2025

Help with Local Weather: Using JSON location data in weather API

Altcademy Team wrote on 7 February 2018

I'm having problems making a request to the open weather api. Here is a link weather app. I can't get any kind of error or response from the open weather api.

First, your browser is likely blocking your api request because codepen is loaded over https and your api request is over http. Second, the api link you are using returns a not found error. Try clicking this instead to see a working endpoint
Finally, you should console log the response of the callback instead of the string "sucess"
$.getJSON(urlString, function(val){ console.log(val); })

Trusted by

Students and instructors from world-class organizations

Join the upcoming Cohort #111

Enroll for March 2nd, 2026