diff options
| author | Vojta Jina | 2012-04-03 11:00:52 -0700 | 
|---|---|---|
| committer | Vojta Jina | 2012-04-04 16:13:02 -0700 | 
| commit | 86182a9415b9209662b16c25c180b958ba7e6cf9 (patch) | |
| tree | 18661207396b5da54658676233ff0e15c6d975fc /src/ng/http.js | |
| parent | 15ecc6f3668885ebc5c7130dd34e00059ddf79ae (diff) | |
| download | angular.js-86182a9415b9209662b16c25c180b958ba7e6cf9.tar.bz2 | |
feat($http): add withCredentials config option
Diffstat (limited to 'src/ng/http.js')
| -rw-r--r-- | src/ng/http.js | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ng/http.js b/src/ng/http.js index 9c4dafd4..3942c5c7 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -375,6 +375,9 @@ function $HttpProvider() {       *      {@link angular.module.ng.$cacheFactory $cacheFactory}, this cache will be used for       *      caching.       *    - **timeout** – `{number}` – timeout in milliseconds. +     *    - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the +     *      XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5 +     *      requests with credentials} for more information.       *       * @returns {HttpPromise} Returns a {@link angular.module.ng.$q promise} object with the       *   standard `then` method and two http specific methods: `success` and `error`. The `then` @@ -674,7 +677,8 @@ function $HttpProvider() {        // if we won't have the response in cache, send the request to the backend        if (!cachedResp) { -        $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout); +        $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout, +            config.withCredentials);        }        return promise;  | 
