Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HttpClient & HttpResponseMessage missing in VS 2010 - its for consume REST services

does anyone know if HttpClient & HttpResponseMessage classes are available in VS 2010? I can't seem to get them to work, do i need to add a reference or using namespace?

These classes were originally from the starter kit for REST for Vs 2008... In vs 2010 its built in i.e. no use for the starter kit...

But how do I cosume them if these classes are missing...

I have searched google for an answer and all i keep finding is examples for vs 2008 i.e. the REST starter kit.

Any help really appreciated

Thanks in advance

like image 799
mark smith Avatar asked Aug 08 '10 11:08

mark smith


2 Answers

Use NuGet to install the WebApi.All:

  1. from VS2010 menubar: View -> Other Windows -> Package Manager Console
  2. from Package Manager Console type in the command Install-Package WebApi.All
  3. in .cs add "using System.Net.Http;"
like image 76
RAM Avatar answered Sep 30 '22 12:09

RAM


No they are not. They will be in the next version of the .Net framework. Until then you will need to continue using the ones from the WCF REST Starter kit.

like image 30
Darrel Miller Avatar answered Sep 30 '22 11:09

Darrel Miller