Hey everybody! First time poster here, go easy on me!
So I’ve been working on the random quote generator intermediate front-end project. In my search for an API to use to generate the quotes, my frontrunner was the Forismatic API at forismatic.com. It’s free and unlimited which suits my needs perfectly, except for one problem: I just can’t get it to work! I keep getting a CORS error which says I am not allowed access because “no access-control-allow-origin header is set on the requested resource”. I read the CORS documentation to see if I could find a solution, but I couldn’t understand much of it. Help? Here’s a link to my codepen project: https://codepen.io/Vetsen86/pen/YEBMmp
The relevant get request is commented out near the top of my JS code. I went ahead and hard coded an object with a bunch of quotes in it to continue with the project, but I’d really like to do it with an API. Please help!