Added functions to test via $http.