Type
Bug
Status
Closed
Reported By
ria sarkar
Component
Wrong/Bad Data
Resolution
Not a Bug
Votes
0
Created
7/Dec/15 1:12 PM EST
Closed
7/Dec/2015 6:10 PM EST
Description
request i am making : var erikurl = 'https://erikberg.com/nba/results/golden-state-warriors.json'; var ACCESS_TOKEN = '10499906-996c-4bbc-9bb1-de73e2b32a41'; return $http({method: 'GET', url: erikurl + '?access_token='+ACCESS_TOKEN, headers: {'Authorization':'Bearer'+ACCESS_TOKEN}}). then(function(response) { service.schedule = response.data; });
Closing Comment
From your code snippet, it looks like you are making a CORS request. It is not working because CORS is disabled on the server. One of the reasons CORS is disabled is because people would post their access token in the public source code on their website. Access tokens should be treated in the same manner as a password and never shared or posted publicly. Also recommend checking out the Node.js example (https://erikberg.com/api/examples/nodejs) for formulating an http request object as it is similar to AngularJS.