I try to show mediawiki API inside Snap! but get a message 'Unexpected end of JSON input"
The request is:
/w/api.php?action=query&format=json&prop=info&titles=Albert%20Einstein
The answer:
{"batchcomplete":"","query":{"pages":{"736":{"pageid":736,"ns":0,"title":"Albert Einstein","contentmodel":"wikitext","pagelanguage":"en","pagelanguagehtmlcode":"en","pagelanguagedir":"ltr","touched":"2023-09-11T08:49:29Z","lastrevid":1174741664,"length":234555}}}}
It's a CORS issue. Getting access to the data from other websites is no longer possible without the explicit permission of that site. There were plenty of threads about the CORS proxy.
There is also Manual:CORS - MediaWiki
It requires specifying additional headers "origin", "mode" with the "Web Services Access" library.
EDIT. "origin=*" should work as well https://www.mediawiki.org/w/api.php?action=query&format=json&prop=info&titles=Albert%20Einstein&origin=*