| 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;
|
| }
|
|
|
|
|
|
|