How to get data from mediawiki api using Angularjs? -


while try access wiki api using angularjs $http.get(), cors issues occured. here code

$http.get('http://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&exintro=&titles=india') .success(function(data){ console.log('data' +data); });

and error message

xmlhttprequest cannot load https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&exintro=&titles=india. no 'access-control-allow-origin' header present on requested resource. origin 'null' therefore not allowed access.

use jsonp cross-site requests.


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -