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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -