예제 #1
0
        internal static async Task <IResponse <List <Customer> > > FilterAsync(string search, CancellationToken cancellationToken)
        {
            using (var client = new ResponsibleHttpClient(_webApiAddress))
            {
                var customerResponse = await client.GetAsync <List <Customer> >($"Customers/Search/{search}", cancellationToken);

                return(customerResponse);
            }
        }
예제 #2
0
 internal static IResponse <int> Add(Customer customer)
 {
     Thread.Sleep(TimeSpan.FromSeconds(3));
     using (var client = new ResponsibleHttpClient(_webApiAddress))
     {
         var addResponse = client.Put <Customer, int>("Customers/Add", customer, MediaFormat.JSon);
         return(addResponse);
     }
 }
예제 #3
0
 internal static IResponse <List <Customer> > Filter(string search)
 {
     using (var client = new ResponsibleHttpClient(_webApiAddress))
     {
         Thread.Sleep(TimeSpan.FromSeconds(3));
         var customerResponse = client.Get <List <Customer> >($"Customers/Search/{search}");
         return(customerResponse);
     }
 }