diff options
| author | Igor Minar | 2013-03-06 11:20:30 -0800 |
|---|---|---|
| committer | Igor Minar | 2013-03-06 11:20:49 -0800 |
| commit | 1516a69cd21e7f2606ccae97f188807cdb9dfbb2 (patch) | |
| tree | 717abd6e9f470556855351f0443d1355ff153706 | |
| parent | 7a77fdae4f6a1a03734374aacc7264ebd6dbe94d (diff) | |
| download | angular.js-1516a69cd21e7f2606ccae97f188807cdb9dfbb2.tar.bz2 | |
docs($http): add more info about transform function
| -rw-r--r-- | src/ng/http.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ng/http.js b/src/ng/http.js index d61ad89e..97d2a007 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -245,10 +245,14 @@ function $HttpProvider() { * - if XSRF prefix is detected, strip it (see Security Considerations section below) * - if json response is detected, deserialize it using a JSON parser * - * To override these transformation locally, specify transform functions as `transformRequest` - * and/or `transformResponse` properties of the config object. To globally override the default - * transforms, override the `$httpProvider.defaults.transformRequest` and - * `$httpProvider.defaults.transformResponse` properties of the `$httpProvider`. + * To globally augment or override the default transforms, modify the `$httpProvider.defaults.transformRequest` and + * `$httpProvider.defaults.transformResponse` properties of the `$httpProvider`. These properties are by default an + * array of transform functions, which allows you to `push` or `unshift` a new transformation function into the + * transformation chain. You can also decide to completely override any default transformations by assigning your + * transformation functions to these properties directly without the array wrapper. + * + * Similarly, to locally override the request/response transforms, augment the `transformRequest` and/or + * `transformResponse` properties of the config object passed into `$http`. * * * # Caching |
