Chromium Code Reviews| 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); |
| +} |