0
var httpClient = new HttpClient();
var response = await httpClient.GetAsync("URL");

     if (response.StatusCode == HttpStatusCode.OK){
                var result = response.Content.ReadAsStringAsync().Result;

                if (result == "[]")
                {
                    await DisplayAlert("Invalid", "invalid", "Try Again");
                }
                else
                {
                    var name = JsonConvert.DeserializeObject<List<DemoClass>>(result);
      }
}
4

0 回答 0