aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/httpBackend.js
diff options
context:
space:
mode:
authorVojta Jina2012-04-03 11:00:52 -0700
committerVojta Jina2012-04-04 16:13:02 -0700
commit86182a9415b9209662b16c25c180b958ba7e6cf9 (patch)
tree18661207396b5da54658676233ff0e15c6d975fc /src/ng/httpBackend.js
parent15ecc6f3668885ebc5c7130dd34e00059ddf79ae (diff)
downloadangular.js-86182a9415b9209662b16c25c180b958ba7e6cf9.tar.bz2
feat($http): add withCredentials config option
Diffstat (limited to 'src/ng/httpBackend.js')
-rw-r--r--src/ng/httpBackend.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ng/httpBackend.js b/src/ng/httpBackend.js
index abe1d8f5..b2c14b3f 100644
--- a/src/ng/httpBackend.js
+++ b/src/ng/httpBackend.js
@@ -32,7 +32,7 @@ function $HttpBackendProvider() {
function createHttpBackend($browser, XHR, $browserDefer, callbacks, body, locationProtocol) {
// TODO(vojta): fix the signature
- return function(method, url, post, callback, headers, timeout) {
+ return function(method, url, post, callback, headers, timeout, withCredentials) {
$browser.$$incOutstandingRequestCount();
url = url || $browser.url();
@@ -71,6 +71,10 @@ function createHttpBackend($browser, XHR, $browserDefer, callbacks, body, locati
}
};
+ if (withCredentials) {
+ xhr.withCredentials = true;
+ }
+
xhr.send(post || '');
if (timeout > 0) {