private Discount GetMultibuyDiscount(MultibuyBag bag) { string uri = System.Configuration.ConfigurationManager.AppSettings["Next:Use:MultibuyServiceURI"]; var client = new HttpClient(); var response = client.PostAsJsonAsync(uri + "Post?timeout=2000", bag).Result; //92 //5683 .PostAsJsonAsync if (response.IsSuccessStatusCode) { return response.Content.ReadAsAsync<Discount>().Result; } Console.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase); return new Discount(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)