Hi the below is the C# code to get the HTTP response but when I tried it on Ranorex it is not working(showing error message : Namespace HttpWebRequest cannot be found)
Can you please help me out?
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = WebRequestMethods.Http.Get;
request.CookieContainer = cc;
request.AutomaticDecompression = DecompressionMethods.GZip;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
String responseString = reader.ReadToEnd();
response.Close();
return responseString;
Unable to get HTTP Responce
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Unable to get HTTP Responce
Hello,
Which Ranorex version are you using?
Could you please send us the complete error message?
Are you missing the 'System.Net' namespace?
Regards,
Markus (T)
Which Ranorex version are you using?
Could you please send us the complete error message?
Are you missing the 'System.Net' namespace?
Regards,
Markus (T)