@@ -424,7 +424,7 @@ class Http {
424
424
async .Future <HttpResponse > call ({
425
425
String url,
426
426
String method,
427
- data,
427
+ dynamic data,
428
428
Map <String , dynamic > params,
429
429
Map <String , dynamic > headers,
430
430
bool withCredentials: false ,
@@ -458,8 +458,6 @@ class Http {
458
458
});
459
459
460
460
var serverRequest = (HttpResponseConfig config) {
461
- assert (config.data == null || config.data is String || config.data is dom.File );
462
-
463
461
// Strip content-type if data is undefined
464
462
if (config.data == null ) {
465
463
new List .from (headers.keys)
@@ -539,7 +537,6 @@ class Http {
539
537
* of parameters.
540
538
*/
541
539
async .Future <HttpResponse > get (String url, {
542
- String data,
543
540
Map <String , dynamic > params,
544
541
Map <String , String > headers,
545
542
bool withCredentials: false ,
@@ -548,7 +545,7 @@ class Http {
548
545
interceptors,
549
546
cache,
550
547
timeout
551
- }) => call (method: 'GET' , url: url, data: data , params: params, headers: headers,
548
+ }) => call (method: 'GET' , url: url, data: null , params: params, headers: headers,
552
549
withCredentials: withCredentials, xsrfHeaderName: xsrfHeaderName,
553
550
xsrfCookieName: xsrfCookieName, interceptors: interceptors, cache: cache,
554
551
timeout: timeout);
@@ -558,7 +555,7 @@ class Http {
558
555
* of parameters.
559
556
*/
560
557
async .Future <HttpResponse > delete (String url, {
561
- String data,
558
+ dynamic data,
562
559
Map <String , dynamic > params,
563
560
Map <String , String > headers,
564
561
bool withCredentials: false ,
@@ -577,7 +574,7 @@ class Http {
577
574
* of parameters.
578
575
*/
579
576
async .Future <HttpResponse > head (String url, {
580
- String data,
577
+ dynamic data,
581
578
Map <String , dynamic > params,
582
579
Map <String , String > headers,
583
580
bool withCredentials: false ,
@@ -595,7 +592,7 @@ class Http {
595
592
* Shortcut method for PUT requests. See [call] for a complete description
596
593
* of parameters.
597
594
*/
598
- async .Future <HttpResponse > put (String url, String data, {
595
+ async .Future <HttpResponse > put (String url, dynamic data, {
599
596
Map <String , dynamic > params,
600
597
Map <String , String > headers,
601
598
bool withCredentials: false ,
@@ -613,7 +610,7 @@ class Http {
613
610
* Shortcut method for POST requests. See [call] for a complete description
614
611
* of parameters.
615
612
*/
616
- async .Future <HttpResponse > post (String url, String data, {
613
+ async .Future <HttpResponse > post (String url, dynamic data, {
617
614
Map <String , dynamic > params,
618
615
Map <String , String > headers,
619
616
bool withCredentials: false ,
@@ -632,7 +629,7 @@ class Http {
632
629
* of parameters.
633
630
*/
634
631
async .Future <HttpResponse > jsonp (String url, {
635
- String data,
632
+ dynamic data,
636
633
Map <String , dynamic > params,
637
634
Map <String , String > headers,
638
635
bool withCredentials: false ,
0 commit comments