Example #1
0
        public String getRequest(String key, string endpoint)
        {
            var request = new RestRequest(endpoint + key);

            request.AddHeader("Content-Type", "application/json");
            String content = restClient.Get(request).Content;

            ProjectCreateResponse.Root jsonObject = JsonConvert.DeserializeObject <ProjectCreateResponse.Root>(content);
            return(jsonObject.key);
        }
Example #2
0
        public Object PutRequest(String body, String project, String endpoint)
        {
            var request = new RestRequest(endpoint + project);

            request.AddHeader("Content-Type", "application/json");
            request.AddJsonBody(body);
            String content = restClient.Put(request).Content;

            ProjectCreateResponse.Root jsonObject = Newtonsoft.Json.JsonConvert.DeserializeObject <ProjectCreateResponse.Root>(content);
            return(jsonObject.description);
        }