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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 12834005: Fixing documentation for HttpRequest (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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:
Download patch
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 431511acecd016f7d2677189d30f4af4cda02245..f99b2bd50b91b6f06d6c58e4442a186fe5a93319 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -13926,8 +13926,9 @@ class HtmlOptionsCollection extends HtmlCollection {
* wish to retrieve the HTML of the top-level page and print it out.
* The easiest way to do that would be:
*
- * var httpRequest = HttpRequest.get('http://api.dartlang.org',
- * (request) => print(request.responseText));
+ * HttpRequest.getString('http://api.dartlang.org').then((response) {
+ * print(response);
+ * });
*
* **Important**: With the default behavior of this class, your
* code making the request should be served from the same origin (domain name,
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698