Пример #1
0
        public static HttpStatusCode UpdateKeynoteSet(out string content, out string errorMessage, KeynoteSetInfo setInfo)
        {
            HttpStatusCode status = HttpStatusCode.Unused;

            content      = "";
            errorMessage = "";
            try
            {
                var client  = new RestClient(RestApiBaseUrl);
                var request = new RestRequest(apiVersion + "/keynotesets/" + setInfo._id, Method.PUT);
                request.RequestFormat = DataFormat.Json;
                request.AddBody(setInfo);

                IRestResponse response = client.Execute(request);

                content      = response.Content;
                errorMessage = response.ErrorMessage;
                status       = response.StatusCode;
            }
            catch (Exception ex)
            {
                string message = ex.Message;
            }
            return(status);
        }