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

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: Cleanup. 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..0fb9ac112d959347f7eaa5bd145007a08773bd89 100644
--- a/pkg/http_server/lib/src/http_body.dart
+++ b/pkg/http_server/lib/src/http_body.dart
@@ -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,14 @@ 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.
+ * contains access to the request, for reading all request header information
sethladd 2013/10/21 07:37:43 "contains access" is a bit clunky. perhaps "provid
Anders Johnsen 2013/10/21 08:06:57 Done.
+ * 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.
Søren Gjesse 2013/10/21 07:44:08 Maybe add a comment that the request body is (of c
Anders Johnsen 2013/10/21 08:06:57 Done.
*/
- 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