I'm trying to get data from a webservice using json, on another project i did it with WebClient class but that project was a Shared project, this particular project is a Portable Class Library project so webclient is not available, i know in this case i have to use httpclient class, but i'm failing to make it work.
this is the code from the working shared project, i need the same to work in a portable class library project.
*NOTE that in this particular case i don't need any parameters to be sent.
string obtainParkingData(string email)
{
WebClient client = new WebClient();
Uri uri = new Uri("http://mydomain/mywebservice.php");
NameValueCollection params = new NameValueCollection();
params.Add("p_email", email);
byte[] responseBytes = cliente.UploadValues(uri, "POST", params);
string responseString = Encoding.UTF8.GetString(responseBytes);
return responseString;
}