| 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 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 * is [:null:], the bad certificate is rejected, as if the callback | 1653 * is [:null:], the bad certificate is rejected, as if the callback |
| 1654 * returned [:false:] | 1654 * returned [:false:] |
| 1655 * | 1655 * |
| 1656 * If the callback returns true, the secure connection is accepted and the | 1656 * If the callback returns true, the secure connection is accepted and the |
| 1657 * [:Future<HttpClientRequest>:] that was returned from the call making the | 1657 * [:Future<HttpClientRequest>:] that was returned from the call making the |
| 1658 * request completes with a valid HttpRequest object. If the callback returns | 1658 * request completes with a valid HttpRequest object. If the callback returns |
| 1659 * false, the [:Future<HttpClientRequest>:] completes with an exception. | 1659 * false, the [:Future<HttpClientRequest>:] completes with an exception. |
| 1660 * | 1660 * |
| 1661 * If a bad certificate is received on a connection attempt, the library calls | 1661 * If a bad certificate is received on a connection attempt, the library calls |
| 1662 * the function that was the value of badCertificateCallback at the time | 1662 * the function that was the value of badCertificateCallback at the time |
| 1663 * the the request is made, even if the value of badCertificateCallback | 1663 * the request is made, even if the value of badCertificateCallback |
| 1664 * has changed since then. | 1664 * has changed since then. |
| 1665 */ | 1665 */ |
| 1666 set badCertificateCallback(bool callback(X509Certificate cert, | 1666 set badCertificateCallback(bool callback(X509Certificate cert, |
| 1667 String host, | 1667 String host, |
| 1668 int port)); | 1668 int port)); |
| 1669 | 1669 |
| 1670 /** | 1670 /** |
| 1671 * Shutdown the HTTP client. If [force] is [:false:] (the default) | 1671 * Shutdown the HTTP client. If [force] is [:false:] (the default) |
| 1672 * the [:HttpClient:] will be kept alive until all active | 1672 * the [:HttpClient:] will be kept alive until all active |
| 1673 * connections are done. If [force] is [:true:] any active | 1673 * connections are done. If [force] is [:true:] any active |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2024 class RedirectException implements HttpException { | 2024 class RedirectException implements HttpException { |
| 2025 final String message; | 2025 final String message; |
| 2026 final List<RedirectInfo> redirects; | 2026 final List<RedirectInfo> redirects; |
| 2027 | 2027 |
| 2028 const RedirectException(this.message, this.redirects); | 2028 const RedirectException(this.message, this.redirects); |
| 2029 | 2029 |
| 2030 String toString() => "RedirectException: $message"; | 2030 String toString() => "RedirectException: $message"; |
| 2031 | 2031 |
| 2032 Uri get uri => redirects.last.location; | 2032 Uri get uri => redirects.last.location; |
| 2033 } | 2033 } |
| OLD | NEW |