1
受信したコンテンツ(ImagesとJSON)を保存するためにサーバーのレスポンスを再構築しようとしました。 サーバのコードはhereのようなものです TXTファイルを返すようにサーバを変更しました。私はクライアントでfolowingを取得します。Jerseyでマルチパートレスポンスで画像とJSONの両方を受信
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を使って複数のパートレスポンスをリンクしているプロバイダとして返したいとしますか? –