public async Task <IActionResult> GetWallet()
        {
            var result = "";
            HttpResponseMessage responseMessage = await _api.GetWallet();

            if (responseMessage.IsSuccessStatusCode)
            {
                result = responseMessage.Content.ReadAsStringAsync().Result;
                return(Json(result));
            }
            else
            {
                return(Json(result));
            }
        }
Пример #2
0
        public async Task <IActionResult> Wallet()
        {
            HttpResponseMessage responseMessage = await _api.GetWallet();

            if (responseMessage.IsSuccessStatusCode)
            {
                var result = responseMessage.Content.ReadAsStringAsync().Result;
                walletList = JsonConvert.DeserializeObject <List <Wallet> >(result);
                return(View(walletList));
            }
            else
            {
                ViewBag.Message = "Error en el servidor.";
                return(View(walletList));
            }
        }