Feeds:
Posts
Comments

Archive for August, 2009

Calling the GetResponse() method on the HttpWebRequest class yields some interesting results. It determines that a status code of anything else but 200 (OK) is an exceptional case and throws a WebException exception.
The following code demonstrates how to return the status code even if the URL in the request is not OK.

HttpStatusCode httpStatusCode;
HttpWebRequest httpWebRequest = [...]

Read Full Post »