I am working on a tool that parses html source of given urls. Some of them are password protected.
Here is my question: How can I pass authentication credentials with the HttpWebRequest? Does it require setting up a cookie? These are new grounds to me, thus examples would be very helpful.
In summary, I use the following for requests that not require an authentication.
...
HttpWebRequest request =(HttpWebRequest)WebRequest.Create(HttpUtility.UrlDecode(<URL STRING>));
...
HttpWebResponse response =(HttpWebResponse)request.GetResponse();