Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(956)

Unified Diff: pkg/http/lib/src/response.dart

Issue 11825010: Update pkg/http to use the new async APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/http/lib/src/request.dart ('k') | pkg/http/lib/src/streamed_request.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/lib/src/response.dart
diff --git a/pkg/http/lib/src/response.dart b/pkg/http/lib/src/response.dart
index 859b57a8b4361669310d9bb0f485885d8d1dd026..18084146134822d766d1d638b5f0e891bb2f9419 100644
--- a/pkg/http/lib/src/response.dart
+++ b/pkg/http/lib/src/response.dart
@@ -66,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).then((body) {
+ return response.stream.toBytes().then((body) {
return new Response.bytes(
body,
response.statusCode,
« no previous file with comments | « pkg/http/lib/src/request.dart ('k') | pkg/http/lib/src/streamed_request.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698