示例#1
0
        // PUT a list of inventory items to be updated
        public async Task <JsonResponse> UpdateInventoryItems(InventoryRequest request)
        {
            var uri = new Uri(string.Format(Keys.WebAPI + "/inventory", string.Empty));

            try
            {
                var json    = JsonConvert.SerializeObject(request);
                var content = new StringContent(json, Encoding.UTF8, "application/json");
                HttpResponseMessage response = await client.PutAsync(uri, content);

                var JSONstring = await response.Content.ReadAsStringAsync();

                return(JsonConvert.DeserializeObject <JsonResponse>(JSONstring));
            }
            catch
            {
                throw new NotImplementedException();
            }
        }
示例#2
0
 public Task <JsonResponse> UpdateInventoryItems(InventoryRequest request)
 {
     return(_APIservice.UpdateInventoryItems(request));
 }