Skip to content

Instantly share code, notes, and snippets.

@shahriarhossain
Last active June 10, 2016 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shahriarhossain/58a89baaf95491728c03b23f486737bb to your computer and use it in GitHub Desktop.
Save shahriarhossain/58a89baaf95491728c03b23f486737bb to your computer and use it in GitHub Desktop.
Xamarin.forms error
private const string BaseUrl = "http://intilaqemployees.azurewebsites.net/api/employeesapi";
public async Task<List<Employee>> GetEmployeesAsync()
{
var httpClient = new HttpClient();
try
{
var jsonResponse = await httpClient.GetStringAsync(BaseUrl).ConfigureAwait(false);
//The following line never gets executed
var employeesList = JsonConvert.DeserializeObject<List<Employee>>(jsonResponse);
return employeesList;
}
catch (Exception ex)
{
}
return null;
}
@thehoneymad
Copy link

@shahriarhossain
Copy link
Author

shahriarhossain commented Jun 10, 2016

Did try with catch (AggregateException exception) { }
No its not an AggregateException.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment