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)); }
public async Task <IEnumerable <CategoryVm> > GetCategories() { var request = new HttpRequestMessage(HttpMethod.Get, BackEndUrls.GetCategoryUrl()); return(await _apiServive.SendAsync <IEnumerable <CategoryVm> >(request)); }
public async Task <ProductVm> GetProductById(int productId) { var request = new HttpRequestMessage(HttpMethod.Get, BackEndUrls.GetProductByIdUrl(productId)); return(await _apiServive.SendAsync <ProductVm>(request)); }