title: posting to a rest service with restsharp
body: <p>Ok, I'm assuming that this is an easy one, but I can't find my answer anywhere...  I have a client that needs to query a rest api through .net.  He sent me the url for the api, and a sample of the data.  This is what he sent:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;root&gt;
  &lt;request&gt;
  &lt;APIClientID&gt;0&lt;/APIClientID &gt;
  &lt;Version&gt;0&lt;/Version&gt;
  &lt;APIPassword&gt;password&lt;/APIPassword &gt;
  &lt;Function&gt;functionName&lt;/Function &gt;
  &lt;Params&gt;
  &lt;UserId&gt;(current-datetime)&lt;/UserId &gt;
  &lt;page&gt;example.aspx&lt;/page&gt;
  &lt;application&gt;appName&lt;/application&gt;
  &lt;function&gt;functionName&lt;/function&gt;
  &lt;/Params&gt;
  &lt;/request &gt;
  &lt;/root &gt;
  </code></pre>
  
  <p>I'm using restsharp and I'm trying to do a post to the service.  But I keep just getting back the get page with the details for the api.  This is what I'm doing with restsharp...</p>
  
  <pre><code>var client = new RestClient();
  client.BaseUrl = url;
  
  var request = new RestRequest(Method.POST);
  
  request.AddHeader("APIClientID", "4");
  request.AddHeader("Version", "0");
  request.AddHeader("APIPassword", "password");
  request.AddHeader("Function", "TransAPIStats");
  request.AddHeader("Version", "0");
  request.AddParameter("Client", "test client");
  request.AddParameter("UserId", DateTime.Now.ToString());
  request.AddParameter("Page", "example.aspx");
  request.AddParameter("Application", "app");
  request.AddParameter("Function", "function");
  
  RestResponse response = client.Execute(request);
  </code></pre>
  
  <p>any thoughts on where I'm going wrong would be greatly apprecaited!  I'm guessing that there is something about hte xml that I'm not translating properly to the restsharp call, but I'm lost at this point... thanks!</p>