shelf_multipart 2.0.0 copy "shelf_multipart: ^2.0.0" to clipboard
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 and isMultipartForm checks. Use Request.formData() or Request.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.
30
likes
150
pub points
91%
popularity

Publisher

verified publishersimonbinder.eu

shelf_multipart parses multipart and form-data requests for shelf handlers.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http_parser, mime, shelf, string_scanner

More

Packages that depend on shelf_multipart