I\'ve been trying to figure out how to read the contents of a httpclient call, and I can\'t seem to get it. The response status I get is 200, but I can\'t figure out how to
If you are not wanting to use async you can add .Result to force the code to execute synchronously:
private string GetResponseString(string text)
{
var httpClient = new HttpClient();
var parameters = new Dictionary();
parameters["text"] = text;
var response = httpClient.PostAsync(BaseUri, new FormUrlEncodedContent(parameters)).Result;
var contents = response.Content.ReadAsStringAsync().Result;
return contents;
}