Exemple #1
0
        public RecordDeleteResponse Delete(string applicationUrl,
                                           RecordDeleteRequest recordDeleteRequest)
        {
            var client  = new RestClient(applicationUrl);
            var request = new RestRequest(Method.POST);

            request.AddHeader("cache-control", "no-cache");
            request.AddHeader("content-type", "application/json");
            request.AddParameter("application/json",
                                 JsonConvert.SerializeObject(recordDeleteRequest),
                                 ParameterType.RequestBody);

            IRestResponse response        = client.Execute(request);
            var           responseJSON    = response.Content.ToString();
            dynamic       responseJSONObj = JsonConvert.DeserializeObject(responseJSON);

            return(JsonConvert.DeserializeObject <RecordDeleteResponse>(responseJSON));
        }
Exemple #2
0
 public RecordDeleteRequest DeleteRequest(int recId)
 {
     deleteRquest = new RecordDeleteRequest(this, recId);
     return(deleteRquest);
 }