Exemple #1
0
        public async Task <AccountDto> GetAccount(string address)
        {
            try
            {
                HttpResponseMessage responseMessage = await _restClient.GetAsync($"get_account/{address}");

                responseMessage.EnsureSuccessStatusCode();
                var data = await responseMessage.Content.ReadAsStringAsync();

                return(AccountDto.FromJson(data));
            }
            catch (HttpRequestException e)
            {
                Console.WriteLine("\nException Caught!");
                Console.WriteLine("Message :{0} ", e.Message);
                return(new AccountDto()); //todo
            }
        }