Chromium Code Reviews| Index: pkg/http/lib/src/response.dart |
| diff --git a/pkg/http/lib/src/response.dart b/pkg/http/lib/src/response.dart |
| index d3546fe793cdff5ff6bc80098ca31ab81014c124..f0b7872d536327f23793058860fc4ab472f88f6c 100644 |
| --- a/pkg/http/lib/src/response.dart |
| +++ b/pkg/http/lib/src/response.dart |
| @@ -7,6 +7,7 @@ library response; |
| import 'dart:io'; |
| import 'dart:scalarlist'; |
| +import 'base_request.dart'; |
| import 'base_response.dart'; |
| import 'streamed_response.dart'; |
| import 'utils.dart'; |
| @@ -28,13 +29,15 @@ class Response extends BaseResponse { |
| Response( |
| String body, |
| int statusCode, |
| - {Map<String, String> headers: const <String>{}, |
| + {BaseRequest request: null, |
|
Bob Nystrom
2012/11/29 23:57:04
null is the default default value, so you can omit
nweiz
2012/11/30 00:08:54
Done.
|
| + Map<String, String> headers: const <String>{}, |
| bool isRedirect: false, |
| bool persistentConnection: true, |
| String reasonPhrase}) |
| : this.bytes( |
| encodeString(body, _encodingForHeaders(headers)), |
| statusCode, |
| + request: request, |
| headers: headers, |
| isRedirect: isRedirect, |
| persistentConnection: persistentConnection, |
| @@ -44,7 +47,8 @@ class Response extends BaseResponse { |
| Response.bytes( |
| List<int> bodyBytes, |
| int statusCode, |
| - {Map<String, String> headers: const <String>{}, |
| + {BaseRequest request: null, |
| + Map<String, String> headers: const <String>{}, |
| bool isRedirect: false, |
| bool persistentConnection: true, |
| String reasonPhrase}) |
| @@ -52,6 +56,7 @@ class Response extends BaseResponse { |
| super( |
| statusCode, |
| bodyBytes.length, |
| + request: request, |
| headers: headers, |
| isRedirect: isRedirect, |
| persistentConnection: persistentConnection, |
| @@ -64,6 +69,7 @@ class Response extends BaseResponse { |
| return new Response.bytes( |
| body, |
| response.statusCode, |
| + request: response.request, |
| headers: response.headers, |
| isRedirect: response.isRedirect, |
| persistentConnection: response.persistentConnection, |