Help with a corrupt url?

I’m staring at this till i’m blue,
can’t figure out what to do!

the url works if pasted into a browser,
and it console.logs fine, and any other url
works in the call…

thanks for any help.

Which URL? There’s more than one.

The problem is not with your code, or the url you generated. It is with the key you used for the mapquest api. Use the developer tools in your browser instead of the one in codepen, and you’ll see the error message. It looks like you used the sample api key. You prbably need to sign up to get an api key for mapquest to allow you to use it.

1 Like

Thanks, i will stop messing with it then :slight_smile:
weird how the key works when pasted into a browser window tho…
but if you use it as a hyperlink, the prob is clear, thanks again !

https://www.mapquestapi.com/geocoding/v1/reverse?key=lYrP4vF3Uk5zgTiGGuEzQGwGIVDGuy24&location=36.000%2C-115.000&outFormat=json&thumbMaps=true

You’re welcome! It’s not so weird - a lot of invisible information (HTTP headers) is sent whenever you visit a url or make a request. By the way, I just checked and getting a free api key from mapquest is easy - you just have to sign up. I did, and it works. Have you looked at https://learn.freecodecamp.org/coding-interview-prep/take-home-projects/show-the-local-weather?