title: RestSharp print raw request and response headers
body: <p>I'm using <a href="http://restsharp.org/"><code>RestSharp</code></a> to make calls to a webservice. All is well but I was wondering if it would be possible to print the raw request headers and body that is sent out and the raw response headers and the response body that comes back.</p>
  
  <p>This is my code where I create a request and get a response back</p>
  
  <pre><code>public static TResponse ExecutePostCall&lt;TResponse, TRequest&gt;(String url, TRequest requestData, string token= "") where TResponse : new()
  {
      RestRequest request = new RestRequest(url, Method.POST);
      if (!string.IsNullOrWhiteSpace(token))
      {
          request.AddHeader("TOKEN", token);
      }
  
  
      request.RequestFormat = DataFormat.Json;
      request.AddBody(requestData);
  
      // print raw request here
  
      var response = _restClient.Execute&lt;TResponse&gt;(request);
  
      // print raw response here
  
      return response.Data;
  }
  </code></pre>
  
  <p>so, Would it be possible to print the raw request and response?</p>