| Index: sdk/lib/io/http_body.dart
|
| diff --git a/sdk/lib/io/http_body.dart b/sdk/lib/io/http_body.dart
|
| index 7a8a4942f1b6d13204c83a71c3065e6e9649669a..1ec6d175ed730474b4d5ad4d623331befa78ead3 100644
|
| --- a/sdk/lib/io/http_body.dart
|
| +++ b/sdk/lib/io/http_body.dart
|
| @@ -74,7 +74,7 @@ abstract class HttpBody {
|
| * The content type e.g. application/json, application/octet-stream,
|
| * application/x-www-form-urlencoded, text/plain.
|
| */
|
| - String get mimeType;
|
| + ContentType get contentType;
|
|
|
| /**
|
| * A high-level type value, that reflects how the body was parsed, e.g.
|
| @@ -143,3 +143,26 @@ abstract class HttpRequestBody extends HttpBody {
|
| */
|
| HttpResponse get response;
|
| }
|
| +
|
| +
|
| +/**
|
| + * A [HttpBodyFileUpload] object wraps a file upload, presenting a way for
|
| + * extracting filename, contentType and the data of the uploaded file.
|
| + */
|
| +abstract class HttpBodyFileUpload {
|
| + /**
|
| + * The filename of the uploaded file.
|
| + */
|
| + String filename;
|
| +
|
| + /**
|
| + * The [ContentType] of the uploaded file. For 'text/\*' and
|
| + * 'application/json' the [data] field will a String.
|
| + */
|
| + ContentType contentType;
|
| +
|
| + /**
|
| + * The content of the file. Either a [String] or a [List<int>].
|
| + */
|
| + dynamic content;
|
| +}
|
|
|