request.AddParameter("text/json", "body content as a string here",
ParameterType.RequestBody);
If it's a GET request, you can't have a request body and AddParameter
adds values to the URL querystring. If it's a POST you can't include a
POST parameter and a serialized request body since they occupy the
same space. You could do a multipart POST body but this is not very
common. Unfortunately if you're making a POST the only way to set the
URL querystring value is through either string concatenation or
UrlSegments:
var key = "12345";
var request = new RestRequest("api?key=" + key);
// or
var request = new RestRequest("api?key={key});
request.AddUrlSegment("key", "12345");