20.3. Input with multipart/form-data
When you write a JAX-RS service, RESTEasy provides an interface that lets you read the
multipart/form-data
MIME type. multipart/form-data
is often found in web application HTML Form documents, and is generally used to upload files. The form-data
format is like other multipart
formats except that each inlined piece of content is associated with a name. The interface for form-data
input is org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput
.
public interface MultipartFormDataInput extends MultipartInput { @Deprecated Map<String, InputPart> getFormData(); Map<String, List<InputPart>> getFormDataMap(); <T> T getFormDataPart(String key, Class<T> rawType, Type genericType) throws IOException; <T> T getFormDataPart(String key, GenericType<T> type) throws IOException; }
This works similarly to
MultipartInput
, as described earlier in this chapter.