public async Task <IActionResult> Index()
        {
            string resultContent;

            HttpResponseMessage httpResponseMessage;
            FaqModel            faqModel;

            httpResponseMessage = await HttpClientRequest.GetAsync(ApiEndpoints.Faq);

            resultContent = httpResponseMessage.Content.ReadAsStringAsync().Result;
            faqModel      = JsonConvert.DeserializeObject <FaqModel>(resultContent);

            return(View(faqModel));
        }
Exemple #2
0
        public async Task <FaqModel> GetAsync()
        {
            HttpResponseMessage httpResponseMessage = await HttpClientRequest.GetAsync(ApiEndpoints.Faq);

            return(JsonConvert.DeserializeObject <FaqModel>(httpResponseMessage.Content.ReadAsStringAsync().Result));
        }