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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * HTTP status codes. 8 * HTTP status codes.
9 */ 9 */
10 abstract class HttpStatus { 10 abstract class HttpStatus {
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 * 837 *
838 * The second future, which is returned by [:close:], completes with 838 * The second future, which is returned by [:close:], completes with
839 * an [HttpClientResponse] object when the response is received from 839 * an [HttpClientResponse] object when the response is received from
840 * the server. This object contains the headers and body of the 840 * the server. This object contains the headers and body of the
841 * response. 841 * response.
842 842
843 * The future for [HttpClientRequest] is created by methods such as 843 * The future for [HttpClientRequest] is created by methods such as
844 * [getUrl] and [open]. 844 * [getUrl] and [open].
845 * 845 *
846 * When the HTTP response is ready a [HttpClientResponse] object is 846 * When the HTTP response is ready a [HttpClientResponse] object is
847 * provided which provides access to the headers and body of the response. 847 * provided which provides access to the headers and body of the response.
Søren Gjesse 2013/06/26 08:08:01 Add some additional information here that the body
Anders Johnsen 2013/06/26 08:40:13 Done.
848 * If a body is present, it must be read. Otherwise, it'll lead to a resource
849 * leak. Consider using [HttpClientResponse.drain] if the body is unused.
Søren Gjesse 2013/06/26 08:08:01 a resource leak -> resource leaks
Anders Johnsen 2013/06/26 08:40:13 Done.
848 * 850 *
849 * HttpClient client = new HttpClient(); 851 * HttpClient client = new HttpClient();
850 * client.getUrl(Uri.parse("http://www.example.com/")) 852 * client.getUrl(Uri.parse("http://www.example.com/"))
851 * .then((HttpClientRequest request) { 853 * .then((HttpClientRequest request) {
852 * // Prepare the request then call close on it to send it. 854 * // Prepare the request then call close on it to send it.
853 * return request.close(); 855 * return request.close();
854 * }) 856 * })
855 * .then((HttpClientResponse response) { 857 * .then((HttpClientResponse response) {
856 * // Process the response. 858 * // Process the response.
857 * }); 859 * });
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 1387
1386 class RedirectException implements HttpException { 1388 class RedirectException implements HttpException {
1387 final String message; 1389 final String message;
1388 final List<RedirectInfo> redirects; 1390 final List<RedirectInfo> redirects;
1389 1391
1390 const RedirectException(String this.message, 1392 const RedirectException(String this.message,
1391 List<RedirectInfo> this.redirects); 1393 List<RedirectInfo> this.redirects);
1392 1394
1393 String toString() => "RedirectException: $message"; 1395 String toString() => "RedirectException: $message";
1394 } 1396 }
OLDNEW
« 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