Jax-RS Multipart响应 [英] Jax-RS Multipart response
问题描述
我想从我的Web应用程序传递一个多部分的响应.我想通过使用Jax-RS来满足此要求.是否可以通过Jax-RS提供多部分HTTP响应?为此,我是否必须使用MessageBodyWriter并自己实现它,或者我可以将任何类用于多部分响应.
I want to deliver a multipart response from my web application. I'd like to fullfil this requirement by using Jax-RS. Is it possible to provide a Multipart HTTP-Response with Jax-RS? Do I have to use MessageBodyWriter for this purpose and implement this on my own, or is there any class I can use for multipart responses.
非常感谢.
推荐答案
在泽西岛中,您可以使用
In Jersey you can use jersey-media-multipart
module to make your life easier. Follow the documentation on this topic: Multipart section in Jersey User Guide or take a look at the available example multipart-webapp.
这篇关于Jax-RS Multipart响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!