| 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_request; | 5 library base_request; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | |
| 9 import 'dart:isolate'; | |
| 10 | 8 |
| 11 import 'byte_stream.dart'; | 9 import 'byte_stream.dart'; |
| 12 import 'client.dart'; | 10 import 'client.dart'; |
| 13 import 'streamed_response.dart'; | 11 import 'streamed_response.dart'; |
| 14 import 'utils.dart'; | 12 import 'utils.dart'; |
| 15 | 13 |
| 16 /// The base class for HTTP requests. | 14 /// The base class for HTTP requests. |
| 17 /// | 15 /// |
| 18 /// Subclasses of [BaseRequest] can be constructed manually and passed to | 16 /// Subclasses of [BaseRequest] can be constructed manually and passed to |
| 19 /// [BaseClient.send], which allows the user to provide fine-grained control | 17 /// [BaseClient.send], which allows the user to provide fine-grained control |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 123 } |
| 126 | 124 |
| 127 /// Throws an error if this request has been finalized. | 125 /// Throws an error if this request has been finalized. |
| 128 void _checkFinalized() { | 126 void _checkFinalized() { |
| 129 if (!finalized) return; | 127 if (!finalized) return; |
| 130 throw new StateError("Can't modify a finalized Request."); | 128 throw new StateError("Can't modify a finalized Request."); |
| 131 } | 129 } |
| 132 | 130 |
| 133 String toString() => "$method $url"; | 131 String toString() => "$method $url"; |
| 134 } | 132 } |
| OLD | NEW |