OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 /** | 7 /** |
8 * HTTP status codes. | 8 * HTTP status codes. |
9 */ | 9 */ |
10 abstract class HttpStatus { | 10 abstract class HttpStatus { |
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 | 1360 |
1361 /** | 1361 /** |
1362 * Opens a HTTP connection. | 1362 * Opens a HTTP connection. |
1363 * | 1363 * |
1364 * The HTTP method is specified in [method] and the URL to use in | 1364 * The HTTP method is specified in [method] and the URL to use in |
1365 * [url]. | 1365 * [url]. |
1366 * | 1366 * |
1367 * The `Host` header for the request will be set to the value | 1367 * The `Host` header for the request will be set to the value |
1368 * [Uri.host]:[Uri.port] from [url]. This can be overridden through the | 1368 * [Uri.host]:[Uri.port] from [url]. This can be overridden through the |
1369 * [HttpClientRequest] interface before the request is sent. NOTE | 1369 * [HttpClientRequest] interface before the request is sent. NOTE |
1370 * if [host] is an IP address this will still be set in the `Host` | 1370 * if [Uri.host] is an IP address this will still be set in the `Host` |
1371 * header. | 1371 * header. |
1372 * | 1372 * |
1373 * For additional information on the sequence of events during an | 1373 * For additional information on the sequence of events during an |
1374 * HTTP transaction, and the objects returned by the futures, see | 1374 * HTTP transaction, and the objects returned by the futures, see |
1375 * the overall documentation for the class [HttpClient]. | 1375 * the overall documentation for the class [HttpClient]. |
1376 */ | 1376 */ |
1377 Future<HttpClientRequest> openUrl(String method, Uri url); | 1377 Future<HttpClientRequest> openUrl(String method, Uri url); |
1378 | 1378 |
1379 /** | 1379 /** |
1380 * Opens a HTTP connection using the GET method. | 1380 * Opens a HTTP connection using the GET method. |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1993 class RedirectException implements HttpException { | 1993 class RedirectException implements HttpException { |
1994 final String message; | 1994 final String message; |
1995 final List<RedirectInfo> redirects; | 1995 final List<RedirectInfo> redirects; |
1996 | 1996 |
1997 const RedirectException(this.message, this.redirects); | 1997 const RedirectException(this.message, this.redirects); |
1998 | 1998 |
1999 String toString() => "RedirectException: $message"; | 1999 String toString() => "RedirectException: $message"; |
2000 | 2000 |
2001 Uri get uri => redirects.last.location; | 2001 Uri get uri => redirects.last.location; |
2002 } | 2002 } |
OLD | NEW |