$.ajax replaced with $http in rest service