Chromium Code Reviews| 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..336c8d6405d082f9230f63e78c842530380160bb 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 data of the file. Either a [String] or a [List<int>]. |
|
Søren Gjesse
2013/05/07 09:31:31
data -> content
Anders Johnsen
2013/06/11 12:23:01
Done.
|
| + */ |
| + dynamic data; |
| +} |