Use
var yourobject = new MyObject{.....................};
var json = JsonConvert.SerializeObject(yourobject);
var client = new RestClient(url);
var request = new RestRequest(actionPath, Method.POST);
request .AddParameter("application/json; charset=utf-8", json, ParameterType.RequestBody);
request .RequestFormat = DataFormat.Json;
Source:
https://github.com/restsharp/RestSharp/issues/435
var yourobject = new MyObject{.....................};
var json = JsonConvert.SerializeObject(yourobject);
var client = new RestClient(url);
var request = new RestRequest(actionPath, Method.POST);
request .AddParameter("application/json; charset=utf-8", json, ParameterType.RequestBody);
request .RequestFormat = DataFormat.Json;
Source:
https://github.com/restsharp/RestSharp/issues/435