@@ -1186,7 +1186,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
11861186 * data string and returns true if the data is as expected.
11871187 * @param {(Object|function(Object))= } headers HTTP headers or function that receives http header
11881188 * object and returns true if the headers match the current definition.
1189- * @returns {requestHandler } Returns an object with `respond` method that controls how a matched
1189+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
11901190 * request is handled.
11911191 *
11921192 * - respond –
@@ -1222,7 +1222,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
12221222 *
12231223 * @param {string|RegExp } url HTTP url.
12241224 * @param {(Object|function(Object))= } headers HTTP headers.
1225- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1225+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
12261226 * request is handled.
12271227 */
12281228
@@ -1234,7 +1234,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
12341234 *
12351235 * @param {string|RegExp } url HTTP url.
12361236 * @param {(Object|function(Object))= } headers HTTP headers.
1237- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1237+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
12381238 * request is handled.
12391239 */
12401240
@@ -1246,7 +1246,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
12461246 *
12471247 * @param {string|RegExp } url HTTP url.
12481248 * @param {(Object|function(Object))= } headers HTTP headers.
1249- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1249+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
12501250 * request is handled.
12511251 */
12521252
@@ -1260,7 +1260,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
12601260 * @param {(string|RegExp|function(string))= } data HTTP request body or function that receives
12611261 * data string and returns true if the data is as expected.
12621262 * @param {(Object|function(Object))= } headers HTTP headers.
1263- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1263+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
12641264 * request is handled.
12651265 */
12661266
@@ -1274,7 +1274,21 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
12741274 * @param {(string|RegExp|function(string))= } data HTTP request body or function that receives
12751275 * data string and returns true if the data is as expected.
12761276 * @param {(Object|function(Object))= } headers HTTP headers.
1277- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1277+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
1278+ * request is handled.
1279+ */
1280+
1281+ /**
1282+ * @ngdoc method
1283+ * @name $httpBackend#whenPATCH
1284+ * @description
1285+ * Creates a new backend definition for PATCH requests. For more info see `when()`.
1286+ *
1287+ * @param {string|RegExp } url HTTP url.
1288+ * @param {(string|RegExp|function(string))= } data HTTP request body or function that receives
1289+ * data string and returns true if the data is as expected.
1290+ * @param {(Object|function(Object))= } headers HTTP headers.
1291+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
12781292 * request is handled.
12791293 */
12801294
@@ -1285,7 +1299,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
12851299 * Creates a new backend definition for JSONP requests. For more info see `when()`.
12861300 *
12871301 * @param {string|RegExp } url HTTP url.
1288- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1302+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
12891303 * request is handled.
12901304 */
12911305 createShortMethods ( 'when' ) ;
@@ -1304,7 +1318,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
13041318 * is in JSON format.
13051319 * @param {(Object|function(Object))= } headers HTTP headers or function that receives http header
13061320 * object and returns true if the headers match the current expectation.
1307- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1321+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
13081322 * request is handled.
13091323 *
13101324 * - respond –
@@ -1333,7 +1347,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
13331347 *
13341348 * @param {string|RegExp } url HTTP url.
13351349 * @param {Object= } headers HTTP headers.
1336- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1350+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
13371351 * request is handled. See #expect for more info.
13381352 */
13391353
@@ -1345,7 +1359,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
13451359 *
13461360 * @param {string|RegExp } url HTTP url.
13471361 * @param {Object= } headers HTTP headers.
1348- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1362+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
13491363 * request is handled.
13501364 */
13511365
@@ -1357,7 +1371,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
13571371 *
13581372 * @param {string|RegExp } url HTTP url.
13591373 * @param {Object= } headers HTTP headers.
1360- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1374+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
13611375 * request is handled.
13621376 */
13631377
@@ -1372,7 +1386,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
13721386 * receives data string and returns true if the data is as expected, or Object if request body
13731387 * is in JSON format.
13741388 * @param {Object= } headers HTTP headers.
1375- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1389+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
13761390 * request is handled.
13771391 */
13781392
@@ -1387,7 +1401,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
13871401 * receives data string and returns true if the data is as expected, or Object if request body
13881402 * is in JSON format.
13891403 * @param {Object= } headers HTTP headers.
1390- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1404+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
13911405 * request is handled.
13921406 */
13931407
@@ -1402,7 +1416,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
14021416 * receives data string and returns true if the data is as expected, or Object if request body
14031417 * is in JSON format.
14041418 * @param {Object= } headers HTTP headers.
1405- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1419+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
14061420 * request is handled.
14071421 */
14081422
@@ -1413,7 +1427,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
14131427 * Creates a new request expectation for JSONP requests. For more info see `expect()`.
14141428 *
14151429 * @param {string|RegExp } url HTTP url.
1416- * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1430+ * @returns {requestHandler } Returns an object with a `respond` method that controls how a matched
14171431 * request is handled.
14181432 */
14191433 createShortMethods ( 'expect' ) ;
@@ -1506,7 +1520,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
15061520
15071521
15081522 function createShortMethods ( prefix ) {
1509- angular . forEach ( [ 'GET' , 'DELETE' , 'JSONP' ] , function ( method ) {
1523+ angular . forEach ( [ 'GET' , 'DELETE' , 'JSONP' , 'HEAD' ] , function ( method ) {
15101524 $httpBackend [ prefix + method ] = function ( url , headers ) {
15111525 return $httpBackend [ prefix ] ( method , url , undefined , headers ) ;
15121526 } ;
0 commit comments