20.3. Input with multipart/form-data

download PDF
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.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.