@@ -422,6 +422,7 @@ class Http {
422
422
data,
423
423
Map <String , dynamic > params,
424
424
Map <String , dynamic > headers,
425
+ withCredentials: false ,
425
426
xsrfHeaderName,
426
427
xsrfCookieName,
427
428
interceptors,
@@ -481,7 +482,8 @@ class Http {
481
482
var result = _backend.request (url,
482
483
method: method,
483
484
requestHeaders: config.headers,
484
- sendData: config.data).then ((dom.HttpRequest value) {
485
+ sendData: config.data,
486
+ withCredentials: withCredentials).then ((dom.HttpRequest value) {
485
487
// TODO: Uncomment after apps migrate off of this class.
486
488
// assert(value.status >= 200 && value.status < 300);
487
489
@@ -535,15 +537,16 @@ class Http {
535
537
String data,
536
538
Map <String , dynamic > params,
537
539
Map <String , String > headers,
540
+ withCredentials: false ,
538
541
xsrfHeaderName,
539
542
xsrfCookieName,
540
543
interceptors,
541
544
cache,
542
545
timeout
543
- }) => call (method: 'GET' , url: url, data: data, params: params,
544
- headers : headers , xsrfHeaderName: xsrfHeaderName,
545
- xsrfCookieName: xsrfCookieName, interceptors: interceptors,
546
- cache : cache, timeout: timeout);
546
+ }) => call (method: 'GET' , url: url, data: data, params: params, headers : headers,
547
+ withCredentials : withCredentials , xsrfHeaderName: xsrfHeaderName,
548
+ xsrfCookieName: xsrfCookieName, interceptors: interceptors, cache : cache,
549
+ timeout: timeout);
547
550
548
551
/**
549
552
* Shortcut method for DELETE requests. See [call] for a complete description
@@ -553,15 +556,16 @@ class Http {
553
556
String data,
554
557
Map <String , dynamic > params,
555
558
Map <String , String > headers,
559
+ withCredentials: false ,
556
560
xsrfHeaderName,
557
561
xsrfCookieName,
558
562
interceptors,
559
563
cache,
560
564
timeout
561
- }) => call (method: 'DELETE' , url: url, data: data, params: params,
562
- headers : headers , xsrfHeaderName: xsrfHeaderName,
563
- xsrfCookieName: xsrfCookieName, interceptors: interceptors,
564
- cache : cache, timeout: timeout);
565
+ }) => call (method: 'DELETE' , url: url, data: data, params: params, headers : headers,
566
+ withCredentials : withCredentials , xsrfHeaderName: xsrfHeaderName,
567
+ xsrfCookieName: xsrfCookieName, interceptors: interceptors, cache : cache,
568
+ timeout: timeout);
565
569
566
570
/**
567
571
* Shortcut method for HEAD requests. See [call] for a complete description
@@ -571,15 +575,16 @@ class Http {
571
575
String data,
572
576
Map <String , dynamic > params,
573
577
Map <String , String > headers,
578
+ withCredentials: false ,
574
579
xsrfHeaderName,
575
580
xsrfCookieName,
576
581
interceptors,
577
582
cache,
578
583
timeout
579
- }) => call (method: 'HEAD' , url: url, data: data, params: params,
580
- headers : headers , xsrfHeaderName: xsrfHeaderName,
581
- xsrfCookieName: xsrfCookieName, interceptors: interceptors,
582
- cache : cache, timeout: timeout);
584
+ }) => call (method: 'HEAD' , url: url, data: data, params: params, headers : headers,
585
+ withCredentials : withCredentials , xsrfHeaderName: xsrfHeaderName,
586
+ xsrfCookieName: xsrfCookieName, interceptors: interceptors, cache : cache,
587
+ timeout: timeout);
583
588
584
589
/**
585
590
* Shortcut method for PUT requests. See [call] for a complete description
@@ -588,15 +593,16 @@ class Http {
588
593
async .Future <HttpResponse > put (String url, String data, {
589
594
Map <String , dynamic > params,
590
595
Map <String , String > headers,
596
+ withCredentials: false ,
591
597
xsrfHeaderName,
592
598
xsrfCookieName,
593
599
interceptors,
594
600
cache,
595
601
timeout
596
- }) => call (method: 'PUT' , url: url, data: data, params: params,
597
- headers : headers , xsrfHeaderName: xsrfHeaderName,
598
- xsrfCookieName: xsrfCookieName, interceptors: interceptors,
599
- cache : cache, timeout: timeout);
602
+ }) => call (method: 'PUT' , url: url, data: data, params: params, headers : headers,
603
+ withCredentials : withCredentials , xsrfHeaderName: xsrfHeaderName,
604
+ xsrfCookieName: xsrfCookieName, interceptors: interceptors, cache : cache,
605
+ timeout: timeout);
600
606
601
607
/**
602
608
* Shortcut method for POST requests. See [call] for a complete description
@@ -605,15 +611,16 @@ class Http {
605
611
async .Future <HttpResponse > post (String url, String data, {
606
612
Map <String , dynamic > params,
607
613
Map <String , String > headers,
614
+ withCredentials: false ,
608
615
xsrfHeaderName,
609
616
xsrfCookieName,
610
617
interceptors,
611
618
cache,
612
619
timeout
613
- }) => call (method: 'POST' , url: url, data: data, params: params,
614
- headers : headers , xsrfHeaderName: xsrfHeaderName,
615
- xsrfCookieName: xsrfCookieName, interceptors: interceptors,
616
- cache : cache, timeout: timeout);
620
+ }) => call (method: 'POST' , url: url, data: data, params: params, headers : headers,
621
+ withCredentials : withCredentials , xsrfHeaderName: xsrfHeaderName,
622
+ xsrfCookieName: xsrfCookieName, interceptors: interceptors, cache : cache,
623
+ timeout: timeout);
617
624
618
625
/**
619
626
* Shortcut method for JSONP requests. See [call] for a complete description
@@ -623,15 +630,16 @@ class Http {
623
630
String data,
624
631
Map <String , dynamic > params,
625
632
Map <String , String > headers,
633
+ withCredentials: false ,
626
634
xsrfHeaderName,
627
635
xsrfCookieName,
628
636
interceptors,
629
637
cache,
630
638
timeout
631
- }) => call (method: 'JSONP' , url: url, data: data, params: params,
632
- headers : headers , xsrfHeaderName: xsrfHeaderName,
633
- xsrfCookieName: xsrfCookieName, interceptors: interceptors,
634
- cache : cache, timeout: timeout);
639
+ }) => call (method: 'JSONP' , url: url, data: data, params: params, headers : headers,
640
+ withCredentials : withCredentials , xsrfHeaderName: xsrfHeaderName,
641
+ xsrfCookieName: xsrfCookieName, interceptors: interceptors, cache : cache,
642
+ timeout: timeout);
635
643
636
644
/**
637
645
* Parse raw headers into key-value object
0 commit comments