example rest - in memory and using $http service