I'm having trouble doing the post in my API my app until it registers the object but then it crashes the application and closes with this execution error:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path '', line 1, position 1.
public async Task<int> AddFrutas(Fruta fruta)
{
HttpClient client = new HttpClient();
var data = JsonConvert.SerializeObject(fruta);
var content = new StringContent(data, Encoding.UTF8, "application/json");
var response = await client.PostAsync("http://nivelamento.gopagoda.io/api/frutas", content);
var result = JsonConvert.DeserializeObject<int>(response.Content.ReadAsStringAsync().Result);
return result;
}