I am exploring the option of storing a json-file on the same server as my Angular app. I am wondering about how I can modify this code to read from a locally stored json file:
ergastAPI.getDrivers = function() {
return $http({
method: 'GET',
url: 'http://mysite.com/app/js/datafile.json'
});
}
The JSON file will be located at http://mysite.com/app/js/datafile.json, while the rest of the application will be stored in its parent folder, app.
Should I use a different method instead of GET for this scenario?