I have not tried, but this may work:
If you force a request for Http 1.0 instead of Http 1.1, then the server will respond with an HTTP header specifying Content-Length
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("http://localhost/audiotest/audio.wav"); wr.ProtocolVersion = Version.Parse("1.0"); HttpWebResponse response = (HttpWebResponse)request.GetResponse();
You will receive the file as a stream in response.GetResponseStream()
All words of the author this
Zeno
source share