HttpWebRequest question
-
Hello, I want to use HttpWebRequest to login and change some settings on a website. In order to do that i need to change the URL addresse of the currenct HttpWebRequest (Login Page) to another web page (Setting Page). I googled this matter and i found out that the RequestUri and HttpWebRequest.Headers["host"] are both readonly. So here is my question: 1. How can i change the url address of the HttpWebRequest object after creating the object. For Example:
WebRequestObject = (HttpWebRequest)HttpWebRequest.Create("http://www.yahoo.com");
WebRequestObject.RequestUri = "http://www.google.com";2. Is there an alternative class in c# for better http functionality? Any kind of help would be appreciated.
-
Hello, I want to use HttpWebRequest to login and change some settings on a website. In order to do that i need to change the URL addresse of the currenct HttpWebRequest (Login Page) to another web page (Setting Page). I googled this matter and i found out that the RequestUri and HttpWebRequest.Headers["host"] are both readonly. So here is my question: 1. How can i change the url address of the HttpWebRequest object after creating the object. For Example:
WebRequestObject = (HttpWebRequest)HttpWebRequest.Create("http://www.yahoo.com");
WebRequestObject.RequestUri = "http://www.google.com";2. Is there an alternative class in c# for better http functionality? Any kind of help would be appreciated.
Ehsan Baghaki wrote:
Is there an alternative class in c# for better http functionality?
Response.Redirect or Server.Transfer
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.