This is an improved version of Scott's answer. I did not like to request parameters, and RestSharp provides a way to directly set the name using AddParameter
var request = new RestRequest(myEndpoint, Method.PATCH);
request.AddHeader("Content-Type", "application/json-patch+json");
request.RequestFormat = DataFormat.Json;
var body = new
{
op = "add",
path = "/Resident",
value = "32432"
}
request.AddParameter("application/json-patch+json", body, ParameterType.RequestBody);
var response = restClient.Execute(request);
source
share