@@ -1186,7 +1186,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1186
1186
* data string and returns true if the data is as expected.
1187
1187
* @param {(Object|function(Object))= } headers HTTP headers or function that receives http header
1188
1188
* 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
1190
1190
* request is handled.
1191
1191
*
1192
1192
* - respond –
@@ -1222,7 +1222,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1222
1222
*
1223
1223
* @param {string|RegExp } url HTTP url.
1224
1224
* @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
1226
1226
* request is handled.
1227
1227
*/
1228
1228
@@ -1234,7 +1234,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1234
1234
*
1235
1235
* @param {string|RegExp } url HTTP url.
1236
1236
* @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
1238
1238
* request is handled.
1239
1239
*/
1240
1240
@@ -1246,7 +1246,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1246
1246
*
1247
1247
* @param {string|RegExp } url HTTP url.
1248
1248
* @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
1250
1250
* request is handled.
1251
1251
*/
1252
1252
@@ -1260,7 +1260,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1260
1260
* @param {(string|RegExp|function(string))= } data HTTP request body or function that receives
1261
1261
* data string and returns true if the data is as expected.
1262
1262
* @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
1264
1264
* request is handled.
1265
1265
*/
1266
1266
@@ -1274,7 +1274,21 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1274
1274
* @param {(string|RegExp|function(string))= } data HTTP request body or function that receives
1275
1275
* data string and returns true if the data is as expected.
1276
1276
* @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
1278
1292
* request is handled.
1279
1293
*/
1280
1294
@@ -1285,7 +1299,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1285
1299
* Creates a new backend definition for JSONP requests. For more info see `when()`.
1286
1300
*
1287
1301
* @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
1289
1303
* request is handled.
1290
1304
*/
1291
1305
createShortMethods ( 'when' ) ;
@@ -1304,7 +1318,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1304
1318
* is in JSON format.
1305
1319
* @param {(Object|function(Object))= } headers HTTP headers or function that receives http header
1306
1320
* 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
1308
1322
* request is handled.
1309
1323
*
1310
1324
* - respond –
@@ -1333,7 +1347,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1333
1347
*
1334
1348
* @param {string|RegExp } url HTTP url.
1335
1349
* @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
1337
1351
* request is handled. See #expect for more info.
1338
1352
*/
1339
1353
@@ -1345,7 +1359,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1345
1359
*
1346
1360
* @param {string|RegExp } url HTTP url.
1347
1361
* @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
1349
1363
* request is handled.
1350
1364
*/
1351
1365
@@ -1357,7 +1371,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1357
1371
*
1358
1372
* @param {string|RegExp } url HTTP url.
1359
1373
* @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
1361
1375
* request is handled.
1362
1376
*/
1363
1377
@@ -1372,7 +1386,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1372
1386
* receives data string and returns true if the data is as expected, or Object if request body
1373
1387
* is in JSON format.
1374
1388
* @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
1376
1390
* request is handled.
1377
1391
*/
1378
1392
@@ -1387,7 +1401,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1387
1401
* receives data string and returns true if the data is as expected, or Object if request body
1388
1402
* is in JSON format.
1389
1403
* @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
1391
1405
* request is handled.
1392
1406
*/
1393
1407
@@ -1402,7 +1416,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1402
1416
* receives data string and returns true if the data is as expected, or Object if request body
1403
1417
* is in JSON format.
1404
1418
* @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
1406
1420
* request is handled.
1407
1421
*/
1408
1422
@@ -1413,7 +1427,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1413
1427
* Creates a new request expectation for JSONP requests. For more info see `expect()`.
1414
1428
*
1415
1429
* @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
1417
1431
* request is handled.
1418
1432
*/
1419
1433
createShortMethods ( 'expect' ) ;
@@ -1506,7 +1520,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1506
1520
1507
1521
1508
1522
function createShortMethods ( prefix ) {
1509
- angular . forEach ( [ 'GET' , 'DELETE' , 'JSONP' ] , function ( method ) {
1523
+ angular . forEach ( [ 'GET' , 'DELETE' , 'JSONP' , 'HEAD' ] , function ( method ) {
1510
1524
$httpBackend [ prefix + method ] = function ( url , headers ) {
1511
1525
return $httpBackend [ prefix ] ( method , url , undefined , headers ) ;
1512
1526
} ;
0 commit comments