shelf_multipart 2.0.0 shelf_multipart: ^2.0.0 copied to clipboard
shelf_multipart parses multipart and form-data requests for shelf handlers.
2.0.0 #
- Breaking: The two libraries have been merged into one,
package:shelf_multipart/shelf_multipart.dart
. - Use extension types instead of extensions, which offers type safety around
the
isMultipart
andisMultipartForm
checks. UseRequest.formData()
orRequest.multipart()
and check for non-null return values to handle multipart requests now:Future<Response> handleReqeuest(Request request) async { if (request.formData() case var form?) { await for (final formData in form.formData) { print('${formData.name}: ${await formData.part.readString()}'); } return Response.ok(); } else { return Response.badRequest(body: 'Not a form-data request'); } }
1.0.0 #
- Make
Multipart
constructor public.
0.1.0 #
- Initial version.