A lot of people working on the freeCodeCamp Wikipedia Viewer run into problems making requests to the Wikipedia API. They plug the request URL into the search browser and it pulls up the data just fine.
According to the cross-site request portion of the API documentation, there are two ways to make a cross-site request to a MediaWiki site: JSONP and CORS.
You can bypass these issues by using JSONP instead, but in this article I’m going to be focusing on making the request work using the CORS method. Continue reading “Wikipedia Viewer: Wikipedia API & Cross-Origin Requests (SOLVED)”