| 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 /** | 5 /** |
| 6 * HTTP status codes. | 6 * HTTP status codes. |
| 7 */ | 7 */ |
| 8 abstract class HttpStatus { | 8 abstract class HttpStatus { |
| 9 static const int CONTINUE = 100; | 9 static const int CONTINUE = 100; |
| 10 static const int SWITCHING_PROTOCOLS = 101; | 10 static const int SWITCHING_PROTOCOLS = 101; |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 * Opens a HTTP connection using the POST method. See [openUrl] for details. | 747 * Opens a HTTP connection using the POST method. See [openUrl] for details. |
| 748 */ | 748 */ |
| 749 HttpClientConnection postUrl(Uri url); | 749 HttpClientConnection postUrl(Uri url); |
| 750 | 750 |
| 751 /** | 751 /** |
| 752 * Sets the function to be called when a site is requesting | 752 * Sets the function to be called when a site is requesting |
| 753 * authentication. The URL requested and the security realm from the | 753 * authentication. The URL requested and the security realm from the |
| 754 * server are passed in the arguments [url] and [realm]. | 754 * server are passed in the arguments [url] and [realm]. |
| 755 * | 755 * |
| 756 * The function returns a [Future] which should complete when the | 756 * The function returns a [Future] which should complete when the |
| 757 * authentication have been resolved. If credentials cannot be | 757 * authentication has been resolved. If credentials cannot be |
| 758 * provided the [Future] should complete with [false]. If | 758 * provided the [Future] should complete with [false]. If |
| 759 * credentials are available the function should add these using | 759 * credentials are available the function should add these using |
| 760 * [addCredentials] before completing the [Future] with the value | 760 * [addCredentials] before completing the [Future] with the value |
| 761 * [true]. | 761 * [true]. |
| 762 * | 762 * |
| 763 * If the [Future] completes with true the request will be retried | 763 * If the [Future] completes with true the request will be retried |
| 764 * using the updated credentials. Otherwise response processing will | 764 * using the updated credentials. Otherwise response processing will |
| 765 * continue normally. | 765 * continue normally. |
| 766 */ | 766 */ |
| 767 set authenticate(Future<bool> f(Uri url, String scheme, String realm)); | 767 set authenticate(Future<bool> f(Uri url, String scheme, String realm)); |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 class RedirectLimitExceededException extends RedirectException { | 1050 class RedirectLimitExceededException extends RedirectException { |
| 1051 const RedirectLimitExceededException(List<RedirectInfo> redirects) | 1051 const RedirectLimitExceededException(List<RedirectInfo> redirects) |
| 1052 : super("Redirect limit exceeded", redirects); | 1052 : super("Redirect limit exceeded", redirects); |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 | 1055 |
| 1056 class RedirectLoopException extends RedirectException { | 1056 class RedirectLoopException extends RedirectException { |
| 1057 const RedirectLoopException(List<RedirectInfo> redirects) | 1057 const RedirectLoopException(List<RedirectInfo> redirects) |
| 1058 : super("Redirect loop detected", redirects); | 1058 : super("Redirect loop detected", redirects); |
| 1059 } | 1059 } |
| OLD | NEW |