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)); }
public RecordDeleteRequest DeleteRequest(int recId) { deleteRquest = new RecordDeleteRequest(this, recId); return(deleteRquest); }