(prefix)
| 2116 | |
| 2117 | |
| 2118 | function createShortMethods(prefix) { |
| 2119 | angular.forEach(['GET', 'DELETE', 'JSONP', 'HEAD'], function(method) { |
| 2120 | $httpBackend[prefix + method] = function(url, headers, keys) { |
| 2121 | assertArgDefined(arguments, 0, 'url'); |
| 2122 | |
| 2123 | // Change url to `null` if `undefined` to stop it throwing an exception further down |
| 2124 | if (angular.isUndefined(url)) url = null; |
| 2125 | |
| 2126 | return $httpBackend[prefix](method, url, undefined, headers, keys); |
| 2127 | }; |
| 2128 | }); |
| 2129 | |
| 2130 | angular.forEach(['PUT', 'POST', 'PATCH'], function(method) { |
| 2131 | $httpBackend[prefix + method] = function(url, data, headers, keys) { |
| 2132 | assertArgDefined(arguments, 0, 'url'); |
| 2133 | |
| 2134 | // Change url to `null` if `undefined` to stop it throwing an exception further down |
| 2135 | if (angular.isUndefined(url)) url = null; |
| 2136 | |
| 2137 | return $httpBackend[prefix](method, url, data, headers, keys); |
| 2138 | }; |
| 2139 | }); |
| 2140 | } |
| 2141 | |
| 2142 | function parseRouteUrl(url) { |
| 2143 | var strippedUrl = stripQueryAndHash(url); |
no test coverage detected