Exemple #1
0
        public async Task <FilamentModel> UpdateFilaments(FilamentModel model)
        {
            var updated = await client.PutAsJsonAsync("/datas", HttpClientExtensions.Serialize(model));

            if (updated.IsSuccessStatusCode)
            {
                return(model);
            }
            return(null);
        }
Exemple #2
0
        public async Task <FilamentModel> DeleteFilaments(FilamentModel model)
        {
            var response = await HttpClientExtensions.DeleteAsJsonAsync(client, "/datas", new {
                creator = model.Creator,
                count   = model.Count,
                _id     = model.ID,
                type    = model.Type,
                weight  = model.Weight,
                color   = model.Color
            });

            if (response.IsSuccessStatusCode)
            {
                return(model);
            }
            return(null);
        }