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

Side by Side Diff: sdk/lib/io/http.dart

Issue 203263003: Fix documentation in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 * __Note__: Check out the 746 * __Note__: Check out the
747 * [http_server](http://pub.dartlang.org/packages/http_server) 747 * [http_server](http://pub.dartlang.org/packages/http_server)
748 * package, which makes working with the low-level 748 * package, which makes working with the low-level
749 * dart:io HTTP server subsystem easier. 749 * dart:io HTTP server subsystem easier.
750 * 750 *
751 * HttpRequest objects are generated by an [HttpServer], 751 * HttpRequest objects are generated by an [HttpServer],
752 * which listens for HTTP requests on a specific host and port. 752 * which listens for HTTP requests on a specific host and port.
753 * For each request received, the HttpServer, which is a [Stream], 753 * For each request received, the HttpServer, which is a [Stream],
754 * generates an HttpRequest object and adds it to the stream. 754 * generates an HttpRequest object and adds it to the stream.
755 * 755 *
756 * An HttpRequest object delivers the body content of the request 756 * An HttpRequest object delivers the body content of the request
Lasse Reichstein Nielsen 2014/03/18 11:57:14 Isn't it the body of the response, not the request
Lasse Reichstein Nielsen 2014/03/18 11:57:14 `HttpRequest` everywhere.
Anders Johnsen 2014/03/18 12:30:57 Nope, think POST requests.
Anders Johnsen 2014/03/18 12:30:57 Done.
757 * as a stream of bytes. 757 * as a stream of byte lists.
758 * The object also contains information about the request, 758 * The object also contains information about the request,
759 * such as the method, URI, and headers. 759 * such as the method, URI, and headers.
760 * 760 *
761 * In the following code, an HttpServer listens 761 * In the following code, an HttpServer listens
762 * for HTTP requests and, within the callback function, 762 * for HTTP requests and, within the callback function,
763 * uses the HttpRequest object's `method` property to dispatch requests. 763 * uses the HttpRequest object's `method` property to dispatch requests.
764 * 764 *
765 * final HOST = InternetAddress.LOOPBACK_IP_V4; 765 * final HOST = InternetAddress.LOOPBACK_IP_V4;
766 * final PORT = 4040; 766 * final PORT = 4040;
767 * 767 *
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 class RedirectException implements HttpException { 1642 class RedirectException implements HttpException {
1643 final String message; 1643 final String message;
1644 final List<RedirectInfo> redirects; 1644 final List<RedirectInfo> redirects;
1645 1645
1646 const RedirectException(this.message, this.redirects); 1646 const RedirectException(this.message, this.redirects);
1647 1647
1648 String toString() => "RedirectException: $message"; 1648 String toString() => "RedirectException: $message";
1649 1649
1650 Uri get uri => redirects.last.location; 1650 Uri get uri => redirects.last.location;
1651 } 1651 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698