Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: runtime/bin/http.dart

Issue 11066041: Add support for HTTP proxy in the HTTP client (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from ajohnsen@ Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | runtime/bin/http_impl.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 * Opens a HTTP connection using the POST method. See [open] for details. 702 * Opens a HTTP connection using the POST method. See [open] for details.
703 */ 703 */
704 HttpClientConnection post(String host, int port, String path); 704 HttpClientConnection post(String host, int port, String path);
705 705
706 /** 706 /**
707 * Opens a HTTP connection using the POST method. See [openUrl] for details. 707 * Opens a HTTP connection using the POST method. See [openUrl] for details.
708 */ 708 */
709 HttpClientConnection postUrl(Uri url); 709 HttpClientConnection postUrl(Uri url);
710 710
711 /** 711 /**
712 * Sets the function used to resolve the proxy server to be used for
713 * opening a HTTP connection to the specified [url]. If this
714 * function is not set, direct connections will always be used.
715 *
716 * The string returned by [f] must be in the format used by browser
717 * PAC (proxy auto-config) scripts. That is either
718 *
719 * "DIRECT"
720 *
721 * for using a direct connection or
722 *
723 * "PROXY host:port"
724 *
725 * for using the proxy server [:host:] on port [:port:].
726 *
727 * A configuration can contain several configuration elements
728 * separated by semicolons, e.g.
729 *
730 * "PROXY host:port; PROXY host2:port2; DIRECT"
731 */
732 set findProxy(String f(Uri url));
733
734 /**
712 * Shutdown the HTTP client releasing all resources. 735 * Shutdown the HTTP client releasing all resources.
713 */ 736 */
714 void shutdown(); 737 void shutdown();
715 } 738 }
716 739
717 740
718 /** 741 /**
719 * A [HttpClientConnection] is returned by all [HttpClient] methods 742 * A [HttpClientConnection] is returned by all [HttpClient] methods
720 * that initiate a connection to an HTTP server. The handlers will be 743 * that initiate a connection to an HTTP server. The handlers will be
721 * called as the connection state progresses. 744 * called as the connection state progresses.
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 class RedirectLimitExceededException extends RedirectException { 965 class RedirectLimitExceededException extends RedirectException {
943 const RedirectLimitExceededException(List<RedirectInfo> redirects) 966 const RedirectLimitExceededException(List<RedirectInfo> redirects)
944 : super("Redirect limit exceeded", redirects); 967 : super("Redirect limit exceeded", redirects);
945 } 968 }
946 969
947 970
948 class RedirectLoopException extends RedirectException { 971 class RedirectLoopException extends RedirectException {
949 const RedirectLoopException(List<RedirectInfo> redirects) 972 const RedirectLoopException(List<RedirectInfo> redirects)
950 : super("Redirect loop detected", redirects); 973 : super("Redirect loop detected", redirects);
951 } 974 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | runtime/bin/http_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698