public static async Task InsertSurvey(SurveyFy.API.Models.Survey survey) { HttpClient client = new HttpClient(); HttpResponseMessage response = await client.PostAsJsonAsync("http://api.surveyfy.co.uk/api/surveys", survey); response.EnsureSuccessStatusCode(); }
public static async Task EditSurvey(SurveyFy.API.Models.Survey survey) { HttpClient client = new HttpClient(); HttpResponseMessage response = await client.PutAsJsonAsync("http://api.surveyfy.co.uk/api/surveys/" + survey.Id.ToString(), survey); response.EnsureSuccessStatusCode(); }