declarative $http for angularjs