Need help in Wikipedia Viewer

I am not getting JSON data from wikipedia API. I am using get() function.
This the code:

Add origin=* to handle CORS in your wikipedia api url to fix your immediate problem - use devtools console to see the error message in the first place

"*&titles=Main Page"

Add format=json&formatversion=2&utf8 to get JSON instead of HTML - UTF-8 is for proper handling of characters from non-English languages

"*&format=json&formatversion=2&utf8&titles=Main Page"

chrome devtools console is essential to learning and using javascript

1 Like