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

docs($http): clear up Interceptor docs and code #7460

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
14 changes: 7 additions & 7 deletions src/ng/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,14 +328,14 @@ function $HttpProvider() {
*
* There are two kinds of interceptors (and two kinds of rejection interceptors):
*
* * `request`: interceptors get called with http `config` object. The function is free to
* modify the `config` or create a new one. The function needs to return the `config`
* directly or as a promise.
* * `request`: interceptors get called with a http `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
* resolved with a rejection.
* * `response`: interceptors get called with http `response` object. The function is free to
* modify the `response` or create a new one. The function needs to return the `response`
* directly or as a promise.
* modify the `response` object or create a new one. The function needs to return the `response`
* object directly, or as a promise containing the `response` or a new `response` object.
* * `responseError`: interceptor gets called when a previous interceptor threw an error or
* resolved with a rejection.
*
Expand All @@ -347,7 +347,7 @@ function $HttpProvider() {
* // optional method
* 'request': function(config) {
* // do something on success
* return config || $q.when(config);
* return config;
* },
*
* // optional method
Expand All @@ -364,7 +364,7 @@ function $HttpProvider() {
* // optional method
* 'response': function(response) {
* // do something on success
* return response || $q.when(response);
* return response;
* },
*
* // optional method
Expand Down