private async Task<bool> OpdaterEvents(Event Event) { bool ok = false; using (HttpClient client = new HttpClient()) { //laver en body String jstring = JsonConvert.SerialzeObject(Event); StringContent content = new StringContent(jstring, Encoding.UTF8, mediaType: "application/json"); HttpResponseMessage result = await client.postAsync(URI, content); if (result.IsSuccessSatusCode) { string okRes = await result.Content.ReadAsStringAsync(); ok = JsonConvert.DerialzeObject<bool>(okRes); } } return ok; }