tree: 508d1c710f80b5bf034d3f1fafea221dcb65e3c2 [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.MD
examples/rest31-sebootstrap-multipart/README.MD

Multipart Web app Example

This example demonstrates how to develop RESTful web service with demonstrating Jakarta REST Integration with MIME MultiPart Message Formats and Jakarta REST EE 10 SeBootstrap functionality.

Feel free to compare with pre-Jakarta REST 3.1 Jersey Multipart example (JERSEY_ROOT/examples/multipart-webapp).

Contents

The mapping of the URI path space is presented in the following table:

URI pathDescriptionSample request using curl
/form/partPOST message returning entire stringcurl -X POST -F "part=part1" http://localhost:8080/multipart-webapp/form/part
/form/part-file-namePOST message returning part filename string.Be sure to execute this curl from project directory where pom.xml resides
curl -X POST -F "part=@pom.xml" http://localhost:8080/multipart-webapp/form/part-file-name
/form/xml-jaxb-partPOST message returning xml jaxb part string.No curl sample available, please check test sources.

Running the Example

You can run the example using Jetty as follows:

mvn clean package exec:java

The sample requests are using cURL command line tool.