title: How to add text to request body in RestSharp
body: <p>I'm trying to use RestSharp to consume a web service. So far everything's gone very well (cheers to John Sheehan and all contributors!) but I've run into a snag. Say I want to insert XML into the body of my RestRequest in its already serialized form (i.e., as a string). Is there an easy way to do this? It appears the .AddBody() function conducts serialization behinds the scenes, so my string is being turned into <code>&lt;String /&gt;</code>.</p>
  
  <p>Any help is greatly appreciated!</p>
  
  <p>EDIT: A sample of my current code was requested. See below --</p>
  
  <pre><code>private T ExecuteRequest&lt;T&gt;(string resource,
                              RestSharp.Method httpMethod,
                              IEnumerable&lt;Parameter&gt; parameters = null,
                              string body = null) where T : new()
  {
      RestClient client = new RestClient(this.BaseURL);
      RestRequest req = new RestRequest(resource, httpMethod);
  
      // Add all parameters (and body, if applicable) to the request
      req.AddParameter("api_key", this.APIKey);
      if (parameters != null)
      {
          foreach (Parameter p in parameters) req.AddParameter(p);
      }
  
      if (!string.IsNullOrEmpty(body)) req.AddBody(body); // &lt;-- ISSUE HERE
  
      RestResponse&lt;T&gt; resp = client.Execute&lt;T&gt;(req);
      return resp.Data;
  }
  </code></pre>