Showing posts with label Network. Show all posts
Showing posts with label Network. Show all posts

January 10, 2008

Notes for HttpWebResponse class

You MUST call Close method to close the response and release the connection.

HttpWebRequest HttpWReq = (HttpWebRequest)WebRequest.Create("http://www.google.com");

HttpWebResponse HttpWResp = (HttpWebResponse)HttpWReq.GetResponse();
// Insert code that uses the response object.
HttpWResp.Close();

http://msdn2.microsoft.com/en-us/library/system.net.httpwebresponse.aspx