Chromium Code Reviews| 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 interface HttpStatus { | 8 interface HttpStatus { |
| 9 static final int CONTINUE = 100; | 9 static final int CONTINUE = 100; |
| 10 static final int SWITCHING_PROTOCOLS = 101; | 10 static final int SWITCHING_PROTOCOLS = 101; |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 616 * operations on it. | 616 * operations on it. |
| 617 * | 617 * |
| 618 * This is normally used when a HTTP upgrade request is received | 618 * This is normally used when a HTTP upgrade request is received |
| 619 * and the communication should continue with a different protocol. | 619 * and the communication should continue with a different protocol. |
| 620 */ | 620 */ |
| 621 DetachedSocket detachSocket(); | 621 DetachedSocket detachSocket(); |
| 622 } | 622 } |
| 623 | 623 |
| 624 | 624 |
| 625 /** | 625 /** |
| 626 * HTTP client factory. | 626 * HTTP client factory. The [HttpClient] handles all the sockets associated |
| 627 * with the [HttpClientConnection]s and when the endpoint supports it, it'll | |
|
Bill Hesse
2012/06/22 08:33:44
Isn't the real need for documentation on the HttpS
Søren Gjesse
2012/06/22 08:50:24
The HttpServer will keep running independently of
Anders Johnsen
2012/06/22 09:13:23
Done.
| |
| 628 * use keep-alive. This means that sockets may be open up to 60 seconds after | |
|
Søren Gjesse
2012/06/22 08:12:02
"it'll use keep-alive" -> it will try to reuse ope
Søren Gjesse
2012/06/22 08:12:02
"may be open up to 60 seconds after a requests hav
Søren Gjesse
2012/06/22 08:16:01
Adding a bit more info.
"it'll use keep-alive" ->
Anders Johnsen
2012/06/22 09:13:23
Done.
Anders Johnsen
2012/06/22 09:13:23
Done.
Anders Johnsen
2012/06/22 09:13:23
Done.
| |
| 629 * a requests have completed. Use [:HttpClient.shutdown:] to force close the | |
| 630 * idle sockets. | |
| 627 */ | 631 */ |
| 628 interface HttpClient default _HttpClient { | 632 interface HttpClient default _HttpClient { |
| 629 static final int DEFAULT_HTTP_PORT = 80; | 633 static final int DEFAULT_HTTP_PORT = 80; |
| 630 | 634 |
| 631 HttpClient(); | 635 HttpClient(); |
| 632 | 636 |
| 633 /** | 637 /** |
| 634 * Opens a HTTP connection. The returned [HttpClientConnection] is | 638 * Opens a HTTP connection. The returned [HttpClientConnection] is |
| 635 * used to register callbacks for asynchronous events on the HTTP | 639 * used to register callbacks for asynchronous events on the HTTP |
| 636 * connection. The "Host" header for the request will be set to the | 640 * connection. The "Host" header for the request will be set to the |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 895 class RedirectLimitExceededException extends RedirectException { | 899 class RedirectLimitExceededException extends RedirectException { |
| 896 const RedirectLimitExceededException(List<RedirectInfo> redirects) | 900 const RedirectLimitExceededException(List<RedirectInfo> redirects) |
| 897 : super("Redirect limit exceeded", redirects); | 901 : super("Redirect limit exceeded", redirects); |
| 898 } | 902 } |
| 899 | 903 |
| 900 | 904 |
| 901 class RedirectLoopException extends RedirectException { | 905 class RedirectLoopException extends RedirectException { |
| 902 const RedirectLoopException(List<RedirectInfo> redirects) | 906 const RedirectLoopException(List<RedirectInfo> redirects) |
| 903 : super("Redirect loop detected", redirects); | 907 : super("Redirect loop detected", redirects); |
| 904 } | 908 } |
| OLD | NEW |