Exemple #1
0
        public async Task <SearchProductsViewModel> SearchFilter(string parameters, string email, string customerToken)
        {
            string resultContent;
            HttpResponseMessage     httpResponseMessage;
            SearchProductsViewModel searchProductsViewModel;

            httpResponseMessage = await HttpClientRequest.GetAsyncParam(ApiEndpoints.SearchFilter, parameters, email, customerToken);

            resultContent           = httpResponseMessage.Content.ReadAsStringAsync().Result;
            searchProductsViewModel = JsonConvert.DeserializeObject <SearchProductsViewModel>(resultContent);

            return(searchProductsViewModel);
        }
Exemple #2
0
        public async Task <ProductDetailViewModel> GetAsyncParam(string parameters)
        {
            string resultContent;
            HttpResponseMessage    httpResponseMessage;
            ProductDetailViewModel productDetailModel;

            httpResponseMessage = await HttpClientRequest.GetAsyncParam(ApiEndpoints.ProductDetail, parameters);

            resultContent      = httpResponseMessage.Content.ReadAsStringAsync().Result;
            productDetailModel = JsonConvert.DeserializeObject <ProductDetailViewModel>(resultContent);

            return(productDetailModel);
        }