示例#1
0
        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();
        }
示例#2
0
        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();
        }