function gameData($http) {
$http.defaults.xsrfHeaderName = 'X-CSRFToken';
$http.defaults.xsrfCookieName = 'csrftoken';
$http.defaults.timeout = 6000;
return {
get: function (success, error) {
var options = {
method: 'GET',
url: '/game/api/',
headers: { 'Content-Type': 'application/json; charset=UTF-8' }
};
$http(options).then(success).catch(error);
},