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

Unified Diff: sdk/lib/io/http.dart

Issue 20781005: Improve the HttpClient documentation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http.dart
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index db453ae0f7c9a05d634d331da3c49f009abb8616..f0bb2be58956d1703dfb2a2ae63f3411bd15ec40 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -943,12 +943,21 @@ abstract class HttpClient {
factory HttpClient() => new _HttpClient();
/**
- * Opens a HTTP connection. The returned [HttpClientRequest] is used to
- * fill in the content of the request before sending it. The 'host' header for
- * the request will be set to the value [host]:[port]. This can be overridden
- * through the [HttpClientRequest] interface before the request is sent.
- * NOTE if [host] is an IP address this will still be set in the 'host'
+ * Opens a HTTP connection.
+ *
+ * The HTTP method to use is specified in [method], the server is
+ * specified using [host] and [port], and the path is specified
+ * using [path].
+ *
+ * The `Host` header for the request will be set to the value
+ * [host]:[port]. This can be overridden through the
+ * [HttpClientRequest] interface before the request is sent. NOTE
+ * if [host] is an IP address this will still be set in the `Host`
* header.
+ *
+ * For additional information on when the returned future completes,
+ * and the flow of the HTTP request, see the overall documentation
Bill Hesse 2013/08/01 08:33:31 Would completes, and on using the HttpClientReque
Søren Gjesse 2013/08/01 09:25:59 Yes, thanks (picked the second one).
+ * for the class [HttpClient].
*/
Future<HttpClientRequest> open(String method,
String host,
@@ -956,36 +965,58 @@ abstract class HttpClient {
String path);
/**
- * Opens a HTTP connection. The returned [HttpClientRequest] is used to
- * fill in the content of the request before sending it. The 'hosth header for
- * the request will be set to the value [host]:[port]. This can be overridden
- * through the [HttpClientRequest] interface before the request is sent.
- * NOTE if [host] is an IP address this will still be set in the 'host'
+ * Opens a HTTP connection.
+ *
+ * Tht HTTP method is specified in [method] and the URL to use in
+ * [url].
+ *
+ * The `Host` header for the request will be set to the value
+ * [host]:[port]. This can be overridden through the
+ * [HttpClientRequest] interface before the request is sent. NOTE
+ * if [host] is an IP address this will still be set in the `Host`
* header.
+ *
+ * For additional information on when the returned future completes,
+ * and the flow of the HTTP request, see the overall documentation
+ * for the class [HttpClient].
*/
Future<HttpClientRequest> openUrl(String method, Uri url);
/**
- * Opens a HTTP connection using the GET method. See [open] for
- * details. Using this method to open a HTTP connection will set the
- * content length to 0.
+ * Opens a HTTP connection using the GET method.
+ *
+ * The server is specified using [host] and [port], and the path is
+ * specified using [path].
Bill Hesse 2013/08/01 08:33:31 path (and possible query) ?
Søren Gjesse 2013/08/01 09:25:59 Done, added fragment as well.
+ *
+ * See [open] for details.
*/
Future<HttpClientRequest> get(String host, int port, String path);
/**
- * Opens a HTTP connection using the GET method. See [openUrl] for
- * details. Using this method to open a HTTP connection will set the
- * content length to 0.
+ * Opens a HTTP connection using the GET method.
+ *
+ * The URL to use is specified in [url].
+ *
+ * See [openUrl] for details.
*/
Future<HttpClientRequest> getUrl(Uri url);
/**
- * Opens a HTTP connection using the POST method. See [open] for details.
+ * Opens a HTTP connection using the POST method.
+ *
+ * The server is specified using [host] and [port], and the path is
+ * specified using [path].
+ *
+ * See [open] for details.
*/
Future<HttpClientRequest> post(String host, int port, String path);
/**
- * Opens a HTTP connection using the POST method. See [openUrl] for details.
+ * Opens a HTTP connection using the POST method.
+ *
+ * The URL to use is specified in [url].
+ *
+ * See [openUrl] for details.
*/
Future<HttpClientRequest> postUrl(Uri url);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698