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

Unified Diff: pkg/http_server/lib/src/http_body.dart

Issue 31813002: Expose the HttpRequest object in HttpRequestBody, making all request properties available. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | pkg/http_server/lib/src/http_body_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http_server/lib/src/http_body.dart
diff --git a/pkg/http_server/lib/src/http_body.dart b/pkg/http_server/lib/src/http_body.dart
index f05d5b22e04308ee4b730c67d052738a00aabc03..148dad4b345bb16013d601c7244452a6fdb303b0 100644
--- a/pkg/http_server/lib/src/http_body.dart
+++ b/pkg/http_server/lib/src/http_body.dart
@@ -15,7 +15,7 @@ part of http_server;
*
* The following content types are recognized:
*
- * text/\*
+ * text/*
* application/json
* application/x-www-form-urlencoded
* multipart/form-data
@@ -141,12 +141,6 @@ class HttpBodyHandler
*/
abstract class HttpBody {
/**
- * The content type e.g. application/json, application/octet-stream,
- * application/x-www-form-urlencoded, text/plain.
- */
- ContentType get contentType;
-
- /**
* A high-level type value, that reflects how the body was parsed, e.g.
* "text", "binary" and "json".
*/
@@ -166,22 +160,8 @@ abstract class HttpBody {
*/
abstract class HttpClientResponseBody extends HttpBody {
/**
- * Returns the status code.
- */
- int get statusCode;
-
- /**
- * Returns the reason phrase associated with the status code.
- */
- String get reasonPhrase;
-
- /**
- * Returns the response headers.
- */
- HttpHeaders get headers;
-
- /**
- * The [HttpClientResponse] of the HTTP body.
+ * The [HttpClientResponse] from which the [HttpClientResponseBody] was
+ * created.
*/
HttpClientResponse get response;
}
@@ -189,29 +169,17 @@ abstract class HttpClientResponseBody extends HttpBody {
/**
* The [HttpBody] of a [HttpRequest] will be of type [HttpRequestBody]. It
- * contains the fields used to read all request header information and
- * responding to the client.
+ * provides access to the request, for reading all request header information
+ * and responding to the client.
*/
abstract class HttpRequestBody extends HttpBody {
/**
- * Returns the method for the request.
- */
- String get method;
-
- /**
- * Returns the URI for the request.
- */
- Uri get uri;
-
- /**
- * Returns the request headers.
- */
- HttpHeaders get headers;
-
- /**
- * The [HttpResponse] used for responding to the client.
+ * The [HttpRequest] from which the [HttpRequestBody] was created.
+ *
+ * Note that the [HttpRequest] is already drained at this point, so the
+ * `Stream` methods cannot be used.
*/
- HttpResponse get response;
+ HttpRequest get request;
}
« no previous file with comments | « no previous file | pkg/http_server/lib/src/http_body_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698