@@ -425,13 +425,15 @@ function $HttpProvider() {
425
425
*
426
426
*
427
427
* ## General usage
428
- * The `$http` service is a function which takes a single argument — a configuration object —
428
+ * The `$http` service is a function which takes a single argument — a { @link $http#usage configuration object} —
429
429
* that is used to generate an HTTP request and returns a {@link ng.$q promise}.
430
430
*
431
431
* ```js
432
- * // Simple GET request example :
433
- * $http.get('/someUrl').
434
- * then(function(response) {
432
+ * // Simple GET request example:
433
+ * $http({
434
+ * method: 'GET',
435
+ * url: '/someUrl'
436
+ * }).then(function(response) {
435
437
* // this callback will be called asynchronously
436
438
* // when the response is available
437
439
* }, function(response) {
@@ -440,8 +442,9 @@ function $HttpProvider() {
440
442
* });
441
443
* ```
442
444
*
445
+ * There are also shortcut methods available:
443
446
* ```js
444
- * // Simple POST request example (passing data) :
447
+ * // Simple POST request shortcut example (passing data) :
445
448
* $http.post('/someUrl', {msg:'hello word!'}).
446
449
* then(function(response) {
447
450
* // this callback will be called asynchronously
@@ -655,7 +658,7 @@ function $HttpProvider() {
655
658
*
656
659
* There are two kinds of interceptors (and two kinds of rejection interceptors):
657
660
*
658
- * * `request`: interceptors get called with a http `config` object. The function is free to
661
+ * * `request`: interceptors get called with a http { @link $http#usage `config`} object. The function is free to
659
662
* modify the `config` object or create a new one. The function needs to return the `config`
660
663
* object directly, or a promise containing the `config` or a new `config` object.
661
664
* * `requestError`: interceptor gets called when a previous interceptor threw an error or
0 commit comments