I am attempting to do a GET request to get the item price info for a single item on the steam market.
Here is the exact angularJS script I am using:
<script>
var app = angular.module('csgo', []);
app.controller('MainCtrl', function($scope, $http) {
$http.jsonp("http://steamcommunity.com/market/priceoverview/?currency=3&appid=730&market_hash_name=StatTrak%E2%84%A2%20P250%20%7C%20Steel%20Disruption%20%28Factory%20New%29").success(function(response) {
$scope.values = response;
console.log(response);
});
});
</script>
When I try to do this in my browser I get:
Uncaught SyntaxError: Unexpected token : ?currency=3&appid=730&market_hash_name=StatTrak™ P250 | Steel Disruption (Factory New):1
Inside my chrome browser console. I then click the link in error message (?currency=3&appid=730&market_hash_name=StatTrak™ P250 | Steel Disruption (Factory New):1)
And it takes me to a line that is:
{"success":true,"lowest_price":"1,09€ ","volume":"348","median_price":"1,01€ "}
So I actually get the information, but it gives an error and underlines the JSON response in red. Anyone know the issue?
I am using nodejs, express, and angular.
EDIT:
I tried a different URL: https://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero
And it worked with this URL. So im not sure why the original URL I am trying to request is not working. Any ideas on that?