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

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

Issue 17819004: Document HttpClientResponse data. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Further docs. Created 7 years, 6 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 b045c11f1fff6e808680c25d0bda6a1b7c6160ff..29d561dc3101543991c2e6e1b2b18de1c5cb40db 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -844,7 +844,10 @@ abstract class HttpResponse implements IOSink {
* [getUrl] and [open].
*
* When the HTTP response is ready a [HttpClientResponse] object is
- * provided which provides access to the headers and body of the response.
+ * provided which provides access to the headers and body of the response. The
+ * body is available as a stream implemented by [HttpClientResponse].
+ * If a body is present, it must be read. Otherwise, it'll lead to a resource
+ * leaks. Consider using [HttpClientResponse.drain] if the body is unused.
*
* HttpClient client = new HttpClient();
* client.getUrl(Uri.parse("http://www.example.com/"))
« 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