title: POSTing JsonObject With HttpClient From Web API
body: <p>I'm trying to POST a <code>JsonObject</code> using <code>HttpClient</code> from Web API. I'm not quite sure how to go about this and can't find much in the way of sample code. </p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>var myObject = (dynamic)new JsonObject();
  myObject.Data = "some data";
  myObject.Data2 = "some more data";
  
  HttpClient httpClient = new HttpClient("myurl");
  httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
  
  HttpResponseMessage response = httpClient.Post("", ???);
  </code></pre>
  
  <p>I think I need to cast my <code>JsonObject</code> as a <code>StreamContent</code> but I'm getting hung up on that step. </p>