Does anyone know how can I send a post request url and get response return file download into local directory in C# .net? I have the following code which manage to send a post url request and response with the zip file. how can I save the file into the directory?
var client = new WebClient();
var values = new NameValueCollection();
values["StartDate"] = "18-Sep-2016 00:00";
values["EndDate"] = "23-Sep-2016 00:00";
values["CampaignName"] = "null";
values["SearchBy"] = "Evaluation";
values["CustomFilter"] = "rep.CALLDNIS like '#0400000000%'";
var response = client.UploadValues("http://test.com", values);
client.DownloadFile(response, @"C:\myfile.zip");