Exemple #1
0
        public async Task <OrderCreateResponse> SaveOrder(OrderCreateRequest order)
        {
            var request = new HttpRequestMessage(HttpMethod.Post, BackEndUrls.SaveOrder())
            {
                Content = new StringContent(JsonConvert.SerializeObject(order), Encoding.UTF8, "application/json")
            };

            return(await _apiServive.SendAsync <OrderCreateResponse>(request));
        }
Exemple #2
0
        public async Task <IEnumerable <CategoryVm> > GetCategories()
        {
            var request = new HttpRequestMessage(HttpMethod.Get, BackEndUrls.GetCategoryUrl());

            return(await _apiServive.SendAsync <IEnumerable <CategoryVm> >(request));
        }
Exemple #3
0
        public async Task <ProductVm> GetProductById(int productId)
        {
            var request = new HttpRequestMessage(HttpMethod.Get, BackEndUrls.GetProductByIdUrl(productId));

            return(await _apiServive.SendAsync <ProductVm>(request));
        }