0
vm.getDotaApi = function () {
        var url = "https://api.steampowered.com/IDOTA2Match_570/GetLeagueListing/v1/";
        $http({
            method: 'JSONP',
            url: url,
            dataType: 'json',
            responseType: "json",
            callback: 'JSON_CALLBACK',
            params: {
                key: 'my_key*********',
            }
        }).
        success(function (response) {
        }).
        error(function (data, status, headers, config) {
        });
    }

I tried to get data from Dota 2 using http request. I use AngularJS in my project. After send http-request I could see error in console:

"Uncaught SyntaxError: Unexpected token :".

In "Preview" I get some data, but I can't use these

Image

Request status is 200

Image

I know this question has been asked already but I haven't manage to find a solution which fix my program.

0 Answers0