Chromium Code Reviews| Index: pkg/http/lib/src/base_response.dart |
| diff --git a/pkg/http/lib/src/base_response.dart b/pkg/http/lib/src/base_response.dart |
| index 57f4a95b9d578c7e825d59d0cd77210214f14f44..8b7da0cbb743c676d4924e59eee213aac5f29f66 100644 |
| --- a/pkg/http/lib/src/base_response.dart |
| +++ b/pkg/http/lib/src/base_response.dart |
| @@ -6,11 +6,16 @@ library base_response; |
| import 'dart:io'; |
| +import 'base_request.dart'; |
| + |
| /// The base class for HTTP responses. |
| /// |
| /// Subclasses of [BaseResponse] are usually not constructed manually; instead, |
| /// they're returned by [BaseClient.send] or other HTTP client methods. |
| abstract class BaseResponse { |
| + /// The (frozen) request that triggered this response. |
| + final BaseRequest request; |
|
Bob Nystrom
2012/11/29 23:57:04
Pedantic, but you should have a test that you can
nweiz
2012/11/30 00:08:54
Done.
|
| + |
| /// The status code of the response. |
| final int statusCode; |
| @@ -37,7 +42,8 @@ abstract class BaseResponse { |
| BaseResponse( |
| this.statusCode, |
| this.contentLength, |
| - {this.headers: const <String>{}, |
| + {this.request, |
| + this.headers: const <String>{}, |
| this.isRedirect: false, |
| this.persistentConnection: true, |
| this.reasonPhrase}); |