OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart.io; | 5 part of http_server; |
6 | 6 |
7 | 7 |
8 /** | 8 /** |
9 * [:HttpMultipartFormData:] class used for 'upgrading' a [MimeMultipart] by | 9 * [:HttpMultipartFormData:] class used for 'upgrading' a [MimeMultipart] by |
10 * parsing it as a 'multipart/form-data' part. The following code shows how | 10 * parsing it as a 'multipart/form-data' part. The following code shows how |
11 * it can be used. | 11 * it can be used. |
12 * | 12 * |
13 * HttpServer server = ...; | 13 * HttpServer server = ...; |
14 * server.listen((request) { | 14 * server.listen((request) { |
15 * String boundary = request.headers.contentType.parameters['boundary']; | 15 * String boundary = request.headers.contentType.parameters['boundary']; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 String value(String name); | 64 String value(String name); |
65 | 65 |
66 /** | 66 /** |
67 * Parse a [MimeMultipart] and return a [HttpMultipartFormData]. If the | 67 * Parse a [MimeMultipart] and return a [HttpMultipartFormData]. If the |
68 * [:Content-Disposition:] header is missing or invalid, a [HttpException] is | 68 * [:Content-Disposition:] header is missing or invalid, a [HttpException] is |
69 * thrown. | 69 * thrown. |
70 */ | 70 */ |
71 static HttpMultipartFormData parse(MimeMultipart multipart) | 71 static HttpMultipartFormData parse(MimeMultipart multipart) |
72 => _HttpMultipartFormData.parse(multipart); | 72 => _HttpMultipartFormData.parse(multipart); |
73 } | 73 } |
OLD | NEW |