title: Logging the XML or JSON sent by RestSharp
body: <p>I'm using RestSharp to send information to a API. I would like to log the XML that I've sent to this API so I can debug later.</p>
  
  <p>I would like to do something like this:</p>
  
  <pre><code>var request = new RestRequest(resourcePath, method);
  request.AddBody(dto);
  Logger.Log(request.Content);
  var response = Client.Execute(request);
  </code></pre>
  
  <p>But, the actual request sent by RestSharp does not seem to be exposed.</p>