Downloading pdf file using WebRequests

后端 未结 4 1365
夕颜
夕颜 2020-12-15 09:20

I\'m trying to download a number of pdf files automagically given a list of urls.

Here\'s the code I have:

HttpWebRequest request = (HttpWebRequest)W         


        
4条回答
  •  悲哀的现实
    2020-12-15 09:33

    Why not use the WebClient class?

    using (WebClient webClient = new WebClient())
    {
        webClient.DownloadFile("url", "filePath");
    }
    

提交回复
热议问题