I\'m trying to get content of HttpResponseMessage. It should be: {\"message\":\"Action \'\' does not exist!\",\"success\":false}
, but I don\'t know, how to get
Try this, you can create an extension method like this:
public static string ContentToString(this HttpContent httpContent)
{
var readAsStringAsync = httpContent.ReadAsStringAsync();
return readAsStringAsync.Result;
}
and then, simple call the extension method:
txtBlock.Text = response.Content.ContentToString();
I hope this help you ;-)