using System; using System.Linq; using System.Net.Http; public class Kata { static readonly string CRYPTOCURRENCY_API_URL = "https://api.coinlore.net/api/tickers/"; static void Main(string[] args) { getCryptoCurrencysAsync(); } static async System.Threading.Tasks.Task getCryptoCurrencysAsync() { Console.WriteLine("get!"); var httpClient = new HttpClient(); try { HttpResponseMessage response = await httpClient.GetAsync("https://api.coinlore.net/api/tickers/"); response.EnsureSuccessStatusCode(); string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); } catch (Exception exception) { Console.WriteLine("Exception Hit------------"); Console.WriteLine(exception); } } }