[Mono-list] HttpWebResponse.GetResponseStream()
Kurt Bonne
kurt@linux.be
20 Nov 2002 19:38:38 +0100
Hi,
I'm trying to do a simple WebRequest, but when I try to retrieve the
ResponseStream, it hangs.
The properties 'Status' and 'Server' are OK.
<code>
req = (HttpWebRequest)WebRequest.Create(url);
res = (HttpWebResponse)req.GetResponse();
Console.WriteLine(url);
Console.WriteLine("Status: " + res.StatusCode);
Console.WriteLine("Server: " + res.Server);
StreamReader sr = new StreamReader(res.GetResponseStream());
Console.WriteLine("Everything still OK");
string responseText = sr.ReadToEnd();
// Never get here...
Console.WriteLine("ResponseText = " + responseText);
res.Close();
</code>
Any suggestions?
Thanks,
Kurt