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