How to extract zipped file received from HttpWebResponse?

前端 未结 2 1217
温柔的废话
温柔的废话 2021-01-06 11:50

I put url to browser\'s address bar and it downloads the zip file to HD. The size of zipped file is 386 bytes as written in its properties.

When I use <

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-06 12:06

    Give this a shot:

    var response = webRequest.GetResponse() as HttpWebResponse;
    var stream = response.GetResponseStream();
    var s = new ZipInputStream(stream);
    

    I believe you're very close and that you're using the right approach -- you can use this article to back that up -- their code is very similar.

提交回复
热议问题