Chromium Code Reviews
DescriptionPrepare the HTTP library for inclusion in the standalone VM (step 2)
Change the handling of the received data on HTTPRequest and
HTTPClientResponse to use the InputStream interface instead of
dataReceived and dataEnd handlers.
We should probably do something to make the following serer side and
client side patterns simpler:
void handler(HTTPRequest request, HTTPResponse response) {
...
StringBuffer body = new StringBuffer();
StringInputStream input = new StringInputStream(request.inputStream);
input.dataHandler = () => body.add(input.read());
input.closeHandler = () {
String data = body.toString();
...
}
}
HTTPClientConnection conn = ...
conn.responseHandler = (HTTPClientResponse r) {
...
StringBuffer body = new StringBuffer();
StringInputStream input = new StringInputStream(request.inputStream);
input.dataHandler = () => body.add(input.read());
input.closeHandler = () {
String data = body.toString();
...
}
}
R=ager@google.com,ajohnsen@google.com
BUG=
TEST=
Committed: https://code.google.com/p/dart/source/detail?r=4679
Patch Set 1 #
Total comments: 23
Patch Set 2 : Update http.dart with the changed interface and fix type error #Patch Set 3 : Addressed review comments #
Messages
Total messages: 4 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||