|
|
Created:
7 years, 8 months ago by Søren Gjesse Modified:
7 years, 8 months ago CC:
reviews_dartlang.org Visibility:
Public. |
DescriptionUpdate the dartdoc for HttpClient
There is still no docuemntation on error handling. I will add that later.
R=whesse@google.com, ajohnsen@google.com
BUG=
Committed: https://code.google.com/p/dart/source/detail?r=21333
Patch Set 1 #Patch Set 2 : Minor fixes #
Total comments: 20
Patch Set 3 : Addressed review comments #
Total comments: 2
Messages
Total messages: 8 (0 generated)
Some suggested wording changes. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart File sdk/lib/io/http.dart (right): https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:769: * This is handles as a two step process where two futures are This is a two-step process, triggered by two futures. When the first future completes with a [HttpClientRequest], then HTTP headers and a body can be set on the request, and [:close:] is called to sent it to the server. The second future, the .response field of the request, completes with an [HttpClientResponse] object when the response is received from the server. This object contains the headers and body of the response. The future HttpClientRequest is created by methods such as [getUrl] and [open]. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:769: * This is handles as a two step process where two futures are "handled" https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:777: * provided which provide access to the headers and body of the response. provides https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:807: * All [HttpClient] request sets the following header by default: requests set https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:815: * The [HttpClient] handles all sockets associated HTTP requests and caches all sockets associated with HTTP requests, and when the server supports HTTP 1.1 persistent connections, it will reuse open sockets for several requests. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:819: * time after a requests have completed, unless HTTP procedures unless the protocol requires the request to close the socket. ... to shut down the HttpClient object and force the idle sockets to close.
LGTM https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart File sdk/lib/io/http.dart (right): https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:771: * future for when the response is received. When the request is ready Maybe add that a ready response means that a Socket is successfully connected. That'll also make it clear that failed connections will fail here. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:807: * All [HttpClient] request sets the following header by default: requests https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:811: * This allows the HTTP server to use gzip compression for the body it it -> if https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:815: * The [HttpClient] handles all sockets associated HTTP requests and associated with
https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart File sdk/lib/io/http.dart (right): https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:769: * This is handles as a two step process where two futures are On 2013/04/09 07:56:27, Bill Hesse wrote: > This is a two-step process, triggered by two futures. When the first future > completes with a [HttpClientRequest], then HTTP headers and a body can be set on > the request, and [:close:] is called to sent it to the server. > > The second future, the .response field of the request, completes with an > [HttpClientResponse] object when the > response is received from the server. This object contains > the headers and body of the response. > > The future HttpClientRequest is created by methods such as [getUrl] and [open]. Done. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:769: * This is handles as a two step process where two futures are On 2013/04/09 07:56:27, Bill Hesse wrote: > "handled" Rephrased as suggested. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:771: * future for when the response is received. When the request is ready On 2013/04/09 08:04:28, Anders Johnsen wrote: > Maybe add that a ready response means that a Socket is successfully connected. > That'll also make it clear that failed connections will fail here. Done. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:777: * provided which provide access to the headers and body of the response. On 2013/04/09 07:56:27, Bill Hesse wrote: > provides Done. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:807: * All [HttpClient] request sets the following header by default: On 2013/04/09 07:56:27, Bill Hesse wrote: > requests set Done. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:807: * All [HttpClient] request sets the following header by default: On 2013/04/09 08:04:28, Anders Johnsen wrote: > requests Done. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:811: * This allows the HTTP server to use gzip compression for the body it On 2013/04/09 08:04:28, Anders Johnsen wrote: > it -> if Done. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:815: * The [HttpClient] handles all sockets associated HTTP requests and On 2013/04/09 08:04:28, Anders Johnsen wrote: > associated with Done. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:815: * The [HttpClient] handles all sockets associated HTTP requests and On 2013/04/09 07:56:27, Bill Hesse wrote: > caches all sockets associated with HTTP requests, and when the server supports > HTTP 1.1 persistent connections, it will reuse open sockets for several > requests. Done. https://codereview.chromium.org/13938003/diff/3001/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:819: * time after a requests have completed, unless HTTP procedures On 2013/04/09 07:56:27, Bill Hesse wrote: > unless the protocol requires the request to close the socket. > ... > to shut down the HttpClient object and force the idle sockets to close. Done.
PTAL - Rewrote the comments - Removed reference to request.response - No mentioning of request.done for now
LGTM. https://codereview.chromium.org/13938003/diff/1002/sdk/lib/io/http.dart File sdk/lib/io/http.dart (right): https://codereview.chromium.org/13938003/diff/1002/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:775: * The second future, is returned by [:close:], completes with an future, which is returned ...
https://codereview.chromium.org/13938003/diff/1002/sdk/lib/io/http.dart File sdk/lib/io/http.dart (right): https://codereview.chromium.org/13938003/diff/1002/sdk/lib/io/http.dart#newco... sdk/lib/io/http.dart:775: * The second future, is returned by [:close:], completes with an On 2013/04/12 08:26:00, Bill Hesse wrote: > future, which is returned ... Done.
Message was sent while issue was closed.
Committed patchset #3 manually as r21333 (presubmit successful). |