I
IndigoMontoya
Guest
I want to return the data from my API call. This is my syntax but no data is returned. I assume this is dued to me improperly using the Asyn/Await keywords.
Can a more skilled C# dev assist me here?
public MainPage()
{
InitializeComponent();
QueryThatDBAsync();
}
private async Task QueryThatDBAsync()
{
string URL = "Soda db - sparkling simplicity";
HttpClient httpClient = new HttpClient();
HttpResponseMessage response = await httpClient.GetAsync(new Uri(URL));
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync();
var weatherList = JsonConvert.DeserializeObject<RootObject>(content);
}
}
Continue reading...
Can a more skilled C# dev assist me here?
public MainPage()
{
InitializeComponent();
QueryThatDBAsync();
}
private async Task QueryThatDBAsync()
{
string URL = "Soda db - sparkling simplicity";
HttpClient httpClient = new HttpClient();
HttpResponseMessage response = await httpClient.GetAsync(new Uri(URL));
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync();
var weatherList = JsonConvert.DeserializeObject<RootObject>(content);
}
}
Continue reading...