transformResponse of $http request to format response in specific way, with -spec test file