U
user
Hello
I have function:
HttpWebRequest HttpWReq =
(HttpWebRequest)WebRequest.Create("http://myserver.org/index.php");
HttpWReq.KeepAlive = false;
HttpWebResponse HttpWResp = (HttpWebResponse)HttpWReq.GetResponse();
Stream receiveStream = HttpWResp.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
StreamReader readStream = new StreamReader( receiveStream, encode );
Char[] read = new Char[256];
int count=readStream.Read( read, 0, 256 );
while (count!=0)
{
richTextBox1.Text+=read;
count=readStream.Read( read, 0, 256 );
}
HttpWResp.Close();
readStream.Close();
But after that i have in richTextBox1 only: 'System.Char[]' string
(uninitialized read variable ?).
Why ?
How can i check if WebResponse exist (was received correctly?)
Thanx
I have function:
HttpWebRequest HttpWReq =
(HttpWebRequest)WebRequest.Create("http://myserver.org/index.php");
HttpWReq.KeepAlive = false;
HttpWebResponse HttpWResp = (HttpWebResponse)HttpWReq.GetResponse();
Stream receiveStream = HttpWResp.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
StreamReader readStream = new StreamReader( receiveStream, encode );
Char[] read = new Char[256];
int count=readStream.Read( read, 0, 256 );
while (count!=0)
{
richTextBox1.Text+=read;
count=readStream.Read( read, 0, 256 );
}
HttpWResp.Close();
readStream.Close();
But after that i have in richTextBox1 only: 'System.Char[]' string
(uninitialized read variable ?).
Why ?
How can i check if WebResponse exist (was received correctly?)
Thanx