【发布时间】:2017-12-17 02:51:59
【问题描述】:
我尝试重建服务器的响应以存储接收到的内容(图像和 JSON)。 服务器的代码类似于here 我更改了服务器以返回 TXT 文件,我在客户端上得到了以下内容。
Response response = client.post(body);
logger.info("content :" + response.readEntity(String.class));
--Boundary_9_2112219484_1499871974802
Content-Type: text/plain
Content-Disposition: attachement; filename="file1.txt"
Content of file 1
--Boundary_9_2112219484_1499871974802
Content-Type: text/plain
Content-Disposition: attachement; filename="file2.txt"
Content of file 2
--Boundary_9_2112219484_1499871974802--
感谢您的帮助。
【问题讨论】:
-
能否请您重新表述您的问题。您的意思是说,您也想使用 Cxf 在链接中返回多部分响应作为提供者
标签: java rest jersey cxf multipart