title: Issue setting request content for HttpRequestMessage in Dotnet?
body: <p>I'm new to dotnet/C#, and I'm having a really hard time setting my request body when trying to make an HttpClient request. I've attempted the following:</p>
  <pre><code>string url = &quot;https://sample-url.io&quot;;
  var request = new HttpRequestMessage()
                      {
                          RequestUri = new Uri(url),
                          Method = HttpMethod.Post
                      };
  request.Content = new StringContent(&quot;Test&quot;, Encoding.UTF8, &quot;application/json&quot;);
  </code></pre>
  <p>However, when I print out the request, this is what I see:</p>
  <pre><code>{
     &quot;Content&quot;:{
        &quot;Headers&quot;:[
           {
              &quot;Key&quot;:&quot;Content-Type&quot;,
              &quot;Value&quot;:[
                 &quot;application/json; charset=utf-8&quot;
              ]
           }
        ]
     },
     &quot;Method&quot;:{
        &quot;Method&quot;:&quot;POST&quot;
     },
     &quot;RequestUri&quot;:&quot;https://sample-url.io&quot;,
     &quot;Headers&quot;:[
        
     ],
     &quot;Properties&quot;:{
        
     }
  }
  </code></pre>
  <p>I can't , for the life of me, figure out why <code>Content</code> does not contain the body I set (<code>&quot;Test&quot;</code>), and why it does contain the other parameters under that strange secondary &quot;Header&quot;. I also tried defining Content on creation of the request variable, to no avail:</p>
  <pre><code>var request = new HttpRequestMessage()
                      {
                          RequestUri = new Uri(url),
                          Method = HttpMethod.Post,
                          Content = new StringContent(&quot;Test&quot;, Encoding.UTF8, &quot;application/json&quot;)
                      };
  </code></pre>
  <p>Does anyone see what I'm doing wrong here? Any help is much appreciated!</p>