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

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

Issue 11363063: Add an HTTP library that wraps dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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/streamed_request.dart ('k') | pkg/http/lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/lib/src/streamed_response.dart
diff --git a/pkg/http/lib/src/streamed_response.dart b/pkg/http/lib/src/streamed_response.dart
new file mode 100644
index 0000000000000000000000000000000000000000..8810df7d60e221e20193c5b3ec99ad418e5bec54
--- /dev/null
+++ b/pkg/http/lib/src/streamed_response.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library streamed_response;
+
+import 'dart:io';
+
+import 'base_response.dart';
+
+/// An HTTP response where the response body is received asynchronously after
+/// the headers have been received.
+class StreamedResponse extends BaseResponse {
+ /// The stream from which the response body data can be read.
+ final InputStream stream;
+
+ /// Creates a new streaming response.
+ StreamedResponse(
+ this.stream,
+ int statusCode,
+ int contentLength,
+ {Map<String, String> headers: const <String>{},
+ bool isRedirect: false,
+ bool persistentConnection: true,
+ String reasonPhrase})
+ : super(
+ statusCode,
+ contentLength,
+ headers: headers,
+ isRedirect: isRedirect,
+ persistentConnection: persistentConnection,
+ reasonPhrase: reasonPhrase);
+}
« no previous file with comments | « pkg/http/lib/src/streamed_request.dart ('k') | pkg/http/lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698