$resource API sucks, so skip it and use $http