I completed the Random Quotes and Local Weather projects over the past couple weeks and have recently begun working on the WikiViewer. After immense trouble with JSON and assuming that it may be an API issue with wikipedia.org, I check out my previously working projects, only to find them non-functional.
Anyone else experiencing such issues or have I somehow accidentally altered my code or settings?
Thanks!
P.S. If it’s relevant, the only change to my Chrome browser has been the ‘Postman’ add-on.
HTTPS, as per being informed by another user (as HTTP failed to work back when I first began coding the projects). I was indeed using crossorigin successfully- seems like it now returns “Origin: header is required” for some reason.
Edit #2 - I’ll start investing header origins more in depth. Until then, https://cors-anywhere.herokuapp.com seems to solve the issue, but only intermittently returns objects via the wiki API. Thanks!
I was previously using that, but ended up using action=opensearch&search= because of issues and not being able to limit the search to top 10. I was using crossorigin, but have now been switching between https://cors.now.sh and herokuapp.com.
Sadly, it seems as though both of them are a hit or a miss when it comes to fetching and returning the JSON data via a console.log();.