i want see some game info on steam. I find a api, but when i use it say:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Also, I use jsonp but it is throw an error:
Uncaught SyntaxError: Unexpected token :
My code is below:
$.ajax({
//crossDomain: 'true',
url: 'http://store.steampowered.com/api/appdetails/?appids=730',
//url: 'http://api.steampowered.com/ISteamApps/GetAppList/v0001/',
//url:'http://store.steampowered.com/api/appdetails/?appids=730',
//url:'games.json',
type: 'get',
dataType:'jsonp',
//dataType:'json',
//data = JSON.parse(data);
crossDomain : true,
success:function(data){
console.log(data);
},
error:function(data){
console.log("Hata ",data);
}
});
I use anyorigin.com but it is not work. When I use local .json file working, but I need steam.