Index: pkg/http/lib/src/response.dart |
diff --git a/pkg/http/lib/src/response.dart b/pkg/http/lib/src/response.dart |
index 26e5e61f68e8c4e5d381b51a8a3ae5750d8d9b64..859b57a8b4361669310d9bb0f485885d8d1dd026 100644 |
--- a/pkg/http/lib/src/response.dart |
+++ b/pkg/http/lib/src/response.dart |
@@ -4,6 +4,7 @@ |
library response; |
+import 'dart:async'; |
import 'dart:io'; |
import 'dart:scalarlist'; |
@@ -65,7 +66,7 @@ class Response extends BaseResponse { |
/// Creates a new HTTP response by waiting for the full body to become |
/// available from a [StreamedResponse]. |
static Future<Response> fromStream(StreamedResponse response) { |
- return consumeInputStream(response.stream).transform((body) { |
+ return consumeInputStream(response.stream).then((body) { |
return new Response.bytes( |
body, |
response.statusCode, |