FCC code doesn't behave the same on Codepen

FCC code doesn't behave the same on Codepen
0

#1

I’d like to play around with the code from the FCC lessons for JSON APIs and AJAX on Codepen. However, the code doesn’t behave the same when placed in Codepen. In particular, when clicking the “Get Message” button, nothing happens on Codepen.

Could someone explain to me why the code on FCC lessons for JSON APIs and AJAX, in particular the lessons which incorporate calls to an API, don’t work on Codepen? So far I’ve tried:

Any ideas? Here’s a Codepen that explains my current situation:
https://codepen.io/amcgladd/pen/MvQKPw
Thanks!


#2

Try using this instead of crossorigin.me:
https://cors-anywhere.herokuapp.com


#3

Hey thanks so much! It worked!