Example #1
0
        public async Task <List <Usuario> > GetAllAsync()
        {
            return(await RestClientService <List <Usuario> > .Get("users"));

            //List<Usuario> usuarios = null;
            //HttpResponseMessage response = await RESTClient.ApiClient.GetAsync("users");
            //if (response.IsSuccessStatusCode)
            //{
            //    usuarios = await response.Content.ReadAsAsync<List<Usuario>>();
            //    return usuarios;
            //}
            //else
            //{
            //    throw new Exception(response.ReasonPhrase);
            //}
        }
Example #2
0
 public async Task <List <Cuenta> > GetAll(string companyId)
 => await RestClientService <List <Cuenta> > .Get($"accounts/{companyId}");