Skip to content

Files

Latest commit

 

History

History
 
 

standalone-multipart

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 23, 2023
Aug 23, 2023
Dec 18, 2024

Standalone multipart/form-data Example

In Jakarta RESTful Web Services 3.1 the SeBootstrap API was introduced as well as the EntityPart API for multipart data. This example shows how to use these API’s with RESTEasy.

Building

To build the standalone-multipart quickstart you must have Maven installed and at least Java 11. Then you simply need to run the following:

mvn clean verify

This will create a standalone-multipart.jar which can be executed from the command line. A test is also executed as part of the build.

Running the Quickstart

The standalone-multipart.jar created can be executed from the command.

java -jar target/standalone-multipart.jar

This will start an Undertow container with RESTEasy and CDI support. Then make a multipart/form-data request and print the results of the request. You should end up seeing something like:


Container running at http://localhost:8081/ OK {"name":"RESTEasy","data":"test content","entity":"entity-part"} ---