Last active
June 10, 2016 08:44
-
-
Save shahriarhossain/58a89baaf95491728c03b23f486737bb to your computer and use it in GitHub Desktop.
Xamarin.forms error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did try with catch (AggregateException exception) { }
No its not an AggregateException.