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

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

Issue 264843002: Fix HttpRequest example. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 18360c64d6d85e50a2fb5f5f4dbeefd54a2c4de3..371543fa505218bff53794166aa9ea4a4292729d 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -877,14 +877,8 @@ abstract class Cookie {
*
* void handleGetRequest(HttpRequest req) {
* HttpResponse res = req.response;
- * var body = [];
- * req.listen((List<int> buffer) => body.add(buffer),
- * onDone: () {
- * res.write('Received ${body.length} for request ');
- * res.write(' ${req.method}: ${req.uri.path}');
- * res.close();
- * },
- * onError: handleError);
+ * res.write('Received request ${req.method}: ${req.uri.path}');
+ * res.close();
* }
*/
abstract class HttpRequest implements Stream<List<int>> {
« 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