| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library streamed_response; |
| 6 |
| 7 import 'dart:io'; |
| 8 |
| 9 import 'base_response.dart'; |
| 10 |
| 11 /// An HTTP response where the response body is received asynchronously after |
| 12 /// the headers have been received. |
| 13 class StreamedResponse extends BaseResponse { |
| 14 /// The stream from which the response body data can be read. |
| 15 final InputStream stream; |
| 16 |
| 17 /// Creates a new streaming response. |
| 18 StreamedResponse( |
| 19 this.stream, |
| 20 int statusCode, |
| 21 int contentLength, |
| 22 {Map<String, String> headers: const <String>{}, |
| 23 bool isRedirect: false, |
| 24 bool persistentConnection: true, |
| 25 String reasonPhrase}) |
| 26 : super( |
| 27 statusCode, |
| 28 contentLength, |
| 29 headers: headers, |
| 30 isRedirect: isRedirect, |
| 31 persistentConnection: persistentConnection, |
| 32 reasonPhrase: reasonPhrase); |
| 33 } |
| OLD | NEW |