Este contenido no está disponible en el idioma seleccionado.
20.8. Output with multipart/form-data
RESTEasy provides a simple API to output multipart/form-data.
To output
multipart/form-data
, create a MultipartFormDataOutput
object and call addFormData()
methods. RESTEasy automatically locates a MessageBodyWriter
to marshal your entity objects. As with MultipartInput
, your marshalling may be sensitive to generic type metadata. In this case, use GenericType
. The example below returns a multipart/form-data
format to a calling client. The parts are JAXB-annotated Customer
objects, which will be marshalled into application/xml
.