<pre> WebRequest request = WebRequest.Create( "http://192.168.1.15:88/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=MyHome&pwd=Benstart1983"); // If required by the server, set the credentials. request.Credentials = CredentialCache.DefaultCredentials; // Get the response. WebResponse response = request.GetResponse(); // Display the status. // listBox1.Items.Add(((HttpWebResponse)response).StatusDescription); // Get the stream containing content returned by the server. Stream dataStream = response.GetResponseStream(); // Open the stream using a StreamReader for easy access. StreamReader reader = new StreamReader(dataStream); // Read the content. string responseFromServer = reader.ReadToEnd(); // Display the content. listBox1.Items.Add((responseFromServer)); // Clean up the streams and the response. reader.Close(); response.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)