@@ -544,11 +544,11 @@ function $HttpProvider() {
544
544
545
545
/**
546
546
* @ngdoc method
547
- * @name ng.$http#delete
547
+ * @name ng.$http#head
548
548
* @methodOf ng.$http
549
549
*
550
550
* @description
551
- * Shortcut method to perform `DELETE ` request
551
+ * Shortcut method to perform `HEAD ` request
552
552
*
553
553
* @param {string } url Relative or absolute URL specifying the destination of the request
554
554
* @param {Object= } config Optional configuration object
@@ -557,31 +557,39 @@ function $HttpProvider() {
557
557
558
558
/**
559
559
* @ngdoc method
560
- * @name ng.$http#head
560
+ * @name ng.$http#jsonp
561
561
* @methodOf ng.$http
562
562
*
563
563
* @description
564
- * Shortcut method to perform `HEAD ` request
564
+ * Shortcut method to perform `JSONP ` request
565
565
*
566
- * @param {string } url Relative or absolute URL specifying the destination of the request
566
+ * @param {string } url Relative or absolute URL specifying the destination of the request.
567
+ * Should contain `JSON_CALLBACK` string.
567
568
* @param {Object= } config Optional configuration object
568
569
* @returns {HttpPromise } Future object
569
570
*/
571
+ createShortMethods ( 'get' , 'head' , 'jsonp' ) ;
572
+
570
573
571
574
/**
572
575
* @ngdoc method
573
- * @name ng.$http#jsonp
576
+ * @name ng.$http#del
574
577
* @methodOf ng.$http
575
578
*
576
579
* @description
577
- * Shortcut method to perform `JSONP ` request
580
+ * Shortcut method to perform `DELETE ` request
578
581
*
579
- * @param {string } url Relative or absolute URL specifying the destination of the request.
580
- * Should contain `JSON_CALLBACK` string.
582
+ * @param {string } url Relative or absolute URL specifying the destination of the request
581
583
* @param {Object= } config Optional configuration object
582
584
* @returns {HttpPromise } Future object
583
585
*/
584
- createShortMethods ( 'get' , 'delete' , 'head' , 'jsonp' ) ;
586
+ $http . del = function ( url , config ) {
587
+ return $http ( extend ( config || { } , {
588
+ method : 'DELETE' ,
589
+ url : url
590
+ } ) ) ;
591
+ }
592
+
585
593
586
594
/**
587
595
* @ngdoc method
0 commit comments