Why can't I instantiate an HttpRequest from my Windows client app in c#?

All I want to do is call a URL as an httpRequest using the GET method and get a string back. I have

using System.Web

but I cannot declare

System.Web.HttpRequest request = new ...

what gives? Isn't this the most basic thing? I don't get it.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkurantAuthor Commented:
Assuming there will be questions, I will answer some in advance. I am going to call a webservice provided by a Lotus Notes / Domino application which I also wrote. I am not very clear on exactly how to set up a proper webservice in Domino, but I know that if you point your browser to my URL, you will get back some XML with the proper headers (text/xml) so the browser displays it as XML. I don't want to use POST, just GET.
kaufmed   ( ⚆ _ ⚆ )I asked the operating system what I could do to become a better programmer. It said, "Let me give you some pointers."Commented:
Did you add a reference to System.Web?
jkurantAuthor Commented:
I didn't know I needed to add a reference, but having done that, I see that I can now declare the instance of the HttpRequest object. But why does it want a filename? I haven't gotten it to work yet.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

kaufmed   ( ⚆ _ ⚆ )I asked the operating system what I could do to become a better programmer. It said, "Let me give you some pointers."Commented:
I think what you are looking for is System.Net.HttpWebRequest, not HttpRequest.
using System.Net;


HttpWebRequest request = HttpWebRequest.Create("http://www.example.com");

Open in new window

In stead of messing around with Http requests, just use the WebClient class in the System.Net namespace.

System.Net.WebClient client = new System.Net.WebClient();
string contents = client.DownloadString("http://www.example.com");

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jkurantAuthor Commented:
That's all I needed! Thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.