| 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 base_response; | 5 library base_response; |
| 6 | 6 |
| 7 import 'dart:io'; | |
| 8 | |
| 9 import 'base_request.dart'; | 7 import 'base_request.dart'; |
| 10 | 8 |
| 11 /// The base class for HTTP responses. | 9 /// The base class for HTTP responses. |
| 12 /// | 10 /// |
| 13 /// Subclasses of [BaseResponse] are usually not constructed manually; instead, | 11 /// Subclasses of [BaseResponse] are usually not constructed manually; instead, |
| 14 /// they're returned by [BaseClient.send] or other HTTP client methods. | 12 /// they're returned by [BaseClient.send] or other HTTP client methods. |
| 15 abstract class BaseResponse { | 13 abstract class BaseResponse { |
| 16 /// The (frozen) request that triggered this response. | 14 /// The (frozen) request that triggered this response. |
| 17 final BaseRequest request; | 15 final BaseRequest request; |
| 18 | 16 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 41 /// Creates a new HTTP response. | 39 /// Creates a new HTTP response. |
| 42 BaseResponse( | 40 BaseResponse( |
| 43 this.statusCode, | 41 this.statusCode, |
| 44 this.contentLength, | 42 this.contentLength, |
| 45 {this.request, | 43 {this.request, |
| 46 this.headers: const {}, | 44 this.headers: const {}, |
| 47 this.isRedirect: false, | 45 this.isRedirect: false, |
| 48 this.persistentConnection: true, | 46 this.persistentConnection: true, |
| 49 this.reasonPhrase}); | 47 this.reasonPhrase}); |
| 50 } | 48 } |
| OLD | NEW |