Sending JSON strings with RestSharp

var restClient = new RestClient("http://mybaseaddress.com")
var restRequest = new RestRequest("POST");
restRequest.Resource = "myendpoint";
restRequest.AddParameter("application/json", "{\"Some\":\"Json\"}", ParameterType.RequestBody);
var response = restClient.Execute(restRequest);

Leave a Reply

  

  

  

www.000webhost.com