@@ -435,7 +435,7 @@ class Http {
435
435
async .Future <HttpResponse > call ({
436
436
String url,
437
437
String method,
438
- data,
438
+ dynamic data,
439
439
Map <String , dynamic > params,
440
440
Map <String , dynamic > headers,
441
441
bool withCredentials: false ,
@@ -469,8 +469,6 @@ class Http {
469
469
});
470
470
471
471
serverRequest (HttpResponseConfig config) {
472
- assert (config.data == null || config.data is String || config.data is dom.File );
473
-
474
472
// Strip content-type if data is undefined
475
473
if (config.data == null ) {
476
474
new List .from (headers.keys)
@@ -553,7 +551,6 @@ class Http {
553
551
* of parameters.
554
552
*/
555
553
async .Future <HttpResponse > get (String url, {
556
- String data,
557
554
Map <String , dynamic > params,
558
555
Map <String , String > headers,
559
556
bool withCredentials: false ,
@@ -562,7 +559,7 @@ class Http {
562
559
interceptors,
563
560
cache,
564
561
timeout
565
- }) => call (method: 'GET' , url: url, data: data , params: params, headers: headers,
562
+ }) => call (method: 'GET' , url: url, data: null , params: params, headers: headers,
566
563
withCredentials: withCredentials, xsrfHeaderName: xsrfHeaderName,
567
564
xsrfCookieName: xsrfCookieName, interceptors: interceptors, cache: cache,
568
565
timeout: timeout);
@@ -572,7 +569,7 @@ class Http {
572
569
* of parameters.
573
570
*/
574
571
async .Future <HttpResponse > delete (String url, {
575
- String data,
572
+ dynamic data,
576
573
Map <String , dynamic > params,
577
574
Map <String , String > headers,
578
575
bool withCredentials: false ,
@@ -591,7 +588,7 @@ class Http {
591
588
* of parameters.
592
589
*/
593
590
async .Future <HttpResponse > head (String url, {
594
- String data,
591
+ dynamic data,
595
592
Map <String , dynamic > params,
596
593
Map <String , String > headers,
597
594
bool withCredentials: false ,
@@ -609,7 +606,7 @@ class Http {
609
606
* Shortcut method for PUT requests. See [call] for a complete description
610
607
* of parameters.
611
608
*/
612
- async .Future <HttpResponse > put (String url, String data, {
609
+ async .Future <HttpResponse > put (String url, dynamic data, {
613
610
Map <String , dynamic > params,
614
611
Map <String , String > headers,
615
612
bool withCredentials: false ,
@@ -627,7 +624,7 @@ class Http {
627
624
* Shortcut method for POST requests. See [call] for a complete description
628
625
* of parameters.
629
626
*/
630
- async .Future <HttpResponse > post (String url, String data, {
627
+ async .Future <HttpResponse > post (String url, dynamic data, {
631
628
Map <String , dynamic > params,
632
629
Map <String , String > headers,
633
630
bool withCredentials: false ,
@@ -646,7 +643,7 @@ class Http {
646
643
* of parameters.
647
644
*/
648
645
async .Future <HttpResponse > jsonp (String url, {
649
- String data,
646
+ dynamic data,
650
647
Map <String , dynamic > params,
651
648
Map <String , String > headers,
652
649
bool withCredentials: false ,
0 commit comments