@@ -421,7 +421,7 @@ class Http {
421
421
async .Future <HttpResponse > call ({
422
422
String url,
423
423
String method,
424
- data,
424
+ dynamic data,
425
425
Map <String , dynamic > params,
426
426
Map <String , dynamic > headers,
427
427
bool withCredentials: false ,
@@ -455,8 +455,6 @@ class Http {
455
455
});
456
456
457
457
var serverRequest = (HttpResponseConfig config) {
458
- assert (config.data == null || config.data is String || config.data is dom.File );
459
-
460
458
// Strip content-type if data is undefined
461
459
if (config.data == null ) {
462
460
new List .from (headers.keys)
@@ -536,7 +534,6 @@ class Http {
536
534
* of parameters.
537
535
*/
538
536
async .Future <HttpResponse > get (String url, {
539
- String data,
540
537
Map <String , dynamic > params,
541
538
Map <String , String > headers,
542
539
bool withCredentials: false ,
@@ -545,7 +542,7 @@ class Http {
545
542
interceptors,
546
543
cache,
547
544
timeout
548
- }) => call (method: 'GET' , url: url, data: data , params: params, headers: headers,
545
+ }) => call (method: 'GET' , url: url, data: null , params: params, headers: headers,
549
546
withCredentials: withCredentials, xsrfHeaderName: xsrfHeaderName,
550
547
xsrfCookieName: xsrfCookieName, interceptors: interceptors, cache: cache,
551
548
timeout: timeout);
@@ -555,7 +552,7 @@ class Http {
555
552
* of parameters.
556
553
*/
557
554
async .Future <HttpResponse > delete (String url, {
558
- String data,
555
+ dynamic data,
559
556
Map <String , dynamic > params,
560
557
Map <String , String > headers,
561
558
bool withCredentials: false ,
@@ -574,7 +571,7 @@ class Http {
574
571
* of parameters.
575
572
*/
576
573
async .Future <HttpResponse > head (String url, {
577
- String data,
574
+ dynamic data,
578
575
Map <String , dynamic > params,
579
576
Map <String , String > headers,
580
577
bool withCredentials: false ,
@@ -592,7 +589,7 @@ class Http {
592
589
* Shortcut method for PUT requests. See [call] for a complete description
593
590
* of parameters.
594
591
*/
595
- async .Future <HttpResponse > put (String url, String data, {
592
+ async .Future <HttpResponse > put (String url, dynamic data, {
596
593
Map <String , dynamic > params,
597
594
Map <String , String > headers,
598
595
bool withCredentials: false ,
@@ -610,7 +607,7 @@ class Http {
610
607
* Shortcut method for POST requests. See [call] for a complete description
611
608
* of parameters.
612
609
*/
613
- async .Future <HttpResponse > post (String url, String data, {
610
+ async .Future <HttpResponse > post (String url, dynamic data, {
614
611
Map <String , dynamic > params,
615
612
Map <String , String > headers,
616
613
bool withCredentials: false ,
@@ -629,7 +626,7 @@ class Http {
629
626
* of parameters.
630
627
*/
631
628
async .Future <HttpResponse > jsonp (String url, {
632
- String data,
629
+ dynamic data,
633
630
Map <String , dynamic > params,
634
631
Map <String , String > headers,
635
632
bool withCredentials: false ,
0 commit comments