| 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; | |
| 6 | |
| 7 import 'dart:async'; | 5 import 'dart:async'; |
| 8 import 'dart:collection'; | 6 import 'dart:collection'; |
| 9 | 7 |
| 10 import 'byte_stream.dart'; | 8 import 'byte_stream.dart'; |
| 11 import 'client.dart'; | 9 import 'client.dart'; |
| 12 import 'streamed_response.dart'; | 10 import 'streamed_response.dart'; |
| 13 import 'utils.dart'; | 11 import 'utils.dart'; |
| 14 | 12 |
| 15 /// The base class for HTTP requests. | 13 /// The base class for HTTP requests. |
| 16 /// | 14 /// |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 129 } |
| 132 | 130 |
| 133 // Throws an error if this request has been finalized. | 131 // Throws an error if this request has been finalized. |
| 134 void _checkFinalized() { | 132 void _checkFinalized() { |
| 135 if (!finalized) return; | 133 if (!finalized) return; |
| 136 throw new StateError("Can't modify a finalized Request."); | 134 throw new StateError("Can't modify a finalized Request."); |
| 137 } | 135 } |
| 138 | 136 |
| 139 String toString() => "$method $url"; | 137 String toString() => "$method $url"; |
| 140 } | 138 } |
| OLD | NEW |