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

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

Issue 11338054: 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, 2 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
Index: pkg/http/lib/src/stream_response.dart
diff --git a/pkg/http/lib/src/stream_response.dart b/pkg/http/lib/src/stream_response.dart
new file mode 100644
index 0000000000000000000000000000000000000000..9d885fe04e50ae8f9f8e371271cb6be5dd9599df
--- /dev/null
+++ b/pkg/http/lib/src/stream_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 stream_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 StreamResponse extends BaseResponse {
Bob Nystrom 2012/10/31 01:17:44 "StreamedResponse"?
nweiz 2012/10/31 18:20:59 Done.
+ /// The stream from which the response body data can be read.
+ final InputStream stream;
+
+ /// Create a new streaming response.
+ StreamResponse(
+ 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);
+}

Powered by Google App Engine
This is Rietveld 408576698