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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -