cómo deserializar si la respuesta es html
HttpClient client = new HttpClient();
client.BaseAddress = new Uri(url);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage response = client.GetAsync(url).Result;
if (response.IsSuccessStatusCode)
{
var result = response.Content.ReadAsStringAsync().Result;
var s = Newtonsoft.Json.JsonConvert.DeserializeObject(result);
return "Success";
}
else
{
return "Fail";
}
Annoying Anaconda