简体   繁体   English

如何根据作为rest调用的一部分收到的响应创建一个zip文件

[英]How to create a zip file from the response received as part of rest call

As part of my project i am making a rest call which gives the response as a zip file . 作为我项目的一部分,我正在进行一次休息电话,该电话将响应作为zip文件提供。 In rest client i am getting the response in some big unreadable format. 在其余客户端中,我以某种无法读取的大格式获取响应。 the zip will be containing more than one file ( the name of these files will be different ) every time . 每次zip将包含多个文件(这些文件的名称将不同)。 Can you please suggest me how to read this data and convert it into the zip files which will contain all files . 您能否建议我如何读取此数据并将其转换为包含所有文件的zip文件。

Make the rest api return the URL to the zip. 使其余api将URL返回到zip。 Then you should stream it as a normal file and then you can use a library to unpack the zip. 然后,应将其作为常规文件进行流传输,然后可以使用库来解压缩zip。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM