Best Method to Consume REST Service in .NET 4

I'm creating a .NET 4 ASP standard web app that needs to query a REST web service. I've queried SOAP services, but never a REST service. I'm also new with .NET4.

While I understand how REST services work, I'm not sure what is the best approach for working with them in .NET4. Searching the web I've seen pages recommending using:

HttpWebRequest
WCF REST Starter Kit Preview 2
WebChannelFactory
WebClient

There doesn't seem to be any consensus regarding which to use.

Which approach do you suggest using? Also, one or two sentence pro's and con's for the approaches you are familiar with (doesn't have to be listed above) would be greatly appreciated.
LVL 4
glebnAsked:
Who is Participating?
 
binaryevoConnect With a Mentor Commented:
This all depends on how the rest service is coded and what your trying to achieve in your application.  The only one ive personally ussed is the WCF REST starter kit and based on my experience of when i was doing the research, its the easiest to implement and has some pretty decent code examples online...  Im sure you already have this link but, if not here it is:

http://msdn.microsoft.com/en-us/netframework/cc950529.aspx
0
 
glebnAuthor Commented:
I should mention that I've been working with .NET 2 - .NET 3.5 for about 5 years so I understand the programming side, I just am not yet familiar with all of the improvements in .NET 4.
0
 
glebnAuthor Commented:
Thanks binaryevo, but after some testing I think I'm going to stick with HttpWebRequest since all I need to do is consume REST services and it seems to get the job done adequately.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.