public async Task <FilamentModel> UpdateFilaments(FilamentModel model) { var updated = await client.PutAsJsonAsync("/datas", HttpClientExtensions.Serialize(model)); if (updated.IsSuccessStatusCode) { return(model); } return(null); }
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); }