I am trying to troubleshoot the response object I get from the web service call.
When I try response.StatusCode in ItemService.cs. Says
does not contain definition for 'Statuscode'. Are you missing directive or assembly reference.
I would appreciate if anyone could advise me on how to catch the exact response code and error message.
ItemService.cs
public async Task<List<Item>> GetItems()
{
var response = await _httpClient.GetFromJsonAsync<List<Item>>("api/item");
if(response.StatusCode)// error
{}
}