Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

docs($http): link to the usage section when config is mentioned #12950

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/ng/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,15 @@ function $HttpProvider() {
*
*
* ## General usage
* The `$http` service is a function which takes a single argument — a configuration object —
* The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object}
* that is used to generate an HTTP request and returns a {@link ng.$q promise}.
*
* ```js
* // Simple GET request example :
* $http.get('/someUrl').
* then(function(response) {
* // Simple GET request example:
* $http({
* method: 'GET',
* url: '/someUrl'
* }).then(function(response) {
* // this callback will be called asynchronously
* // when the response is available
* }, function(response) {
Expand All @@ -440,8 +442,9 @@ function $HttpProvider() {
* });
* ```
*
* There are also shortcut methods available:
* ```js
* // Simple POST request example (passing data) :
* // Simple POST request shortcut example (passing data) :
* $http.post('/someUrl', {msg:'hello word!'}).
* then(function(response) {
* // this callback will be called asynchronously
Expand Down Expand Up @@ -655,7 +658,7 @@ function $HttpProvider() {
*
* There are two kinds of interceptors (and two kinds of rejection interceptors):
*
* * `request`: interceptors get called with a http `config` object. The function is free to
* * `request`: interceptors get called with a http {@link $http#usage `config`} object. The function is free to
* modify the `config` object or create a new one. The function needs to return the `config`
* object directly, or a promise containing the `config` or a new `config` object.
* * `requestError`: interceptor gets called when a previous interceptor threw an error or
Expand Down