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

Unified Diff: samples/chat/http.dart

Issue 9495007: Prepare the HTTP library for inclusion in the standalone VM (step 2) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 8 years, 10 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 | « samples/chat/dart_client/chat.dart ('k') | samples/chat/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/chat/http.dart
diff --git a/samples/chat/http.dart b/samples/chat/http.dart
index 10553e5a373ead1ad27ce70effcba56b46ab86a6..2fc4b405e4436463b3a3ca38ccedb36529b8f99d 100644
--- a/samples/chat/http.dart
+++ b/samples/chat/http.dart
@@ -5,6 +5,8 @@
#library("http");
#import("dart:io");
#source("http_impl.dart");
+#source("../../runtime/bin/buffer_list.dart");
+#source("../../runtime/bin/stream_util.dart");
/**
* HTTP status codes.
@@ -142,20 +144,10 @@ interface HTTPRequest default _HTTPRequest {
Map<String, String> get headers();
/**
- * Sets the handler that gets called as request data becomes
- * available. The data delivered are the raw bytes received. If the
- * data is UTF-8 encoded and this callback is not set the callback
- * [dataEnd] will be called with the decoded [String].
+ * Returns the input stream for the request. This is used to read
+ * the request data.
*/
- void set dataReceived(void handler(List<int> data));
-
- /**
- * Sets the handler that gets called when all request data have been
- * received. If the callback [dataReceived] is set the [String]
- * argument will be [null] otherwise it will be the result of UTF-8
- * decoding the request body,
- */
- void set dataEnd(void handler(String data));
+ InputStream get inputStream();
}
@@ -346,20 +338,10 @@ interface HTTPClientResponse default _HTTPClientResponse {
Map get headers();
/**
- * Sets callback to be called as request data becomes available. The
- * data delivered are the raw received. If the data is UTF-8 encoded
- * and this callback is not set the callback [dataEnd] will be
- * called with the decoded [String].
- */
- void set dataReceived(void callback(List<int> data));
-
- /**
- * Sets the callback to be called when all request data have been
- * received. If the callback [dataReceived] is set the [String]
- * argument will be [null] otherwise it will be the result of UTF-8
- * decoding the request body,
+ * Returns the input stream for the response. This is used to read
+ * the response data.
*/
- void set dataEnd(void callback(String data));
+ InputStream get inputStream();
}
« no previous file with comments | « samples/chat/dart_client/chat.dart ('k') | samples/chat/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698