Error in sending HTTP requests in Windows Phone 7.1

64 Views Asked by At

I am trying to send a HTTP request in Windows Phone using Visual Studio 2010 Express, but I am getting this error:

The type or namespace name 'HttpClient' could not be found (are you missing a using directive or an assembly reference?)

It's not able to find HttpClient even when I used using system.windows.httpclient. I am not able to get which reference is actually missing.

What reference do I need to add? Or what do I need to do to resolve this issue?

1

There are 1 best solutions below

0
Christian Amado On BEST ANSWER

You have two options here.

  1. You must use Visual Studio 2012 or superior.
  2. Replace your HttpClient class with WebClient or HttpWebRequest.

You cannot use HttpClient with Visual Studio 2010, no Framework 4.5 supported.