title: Unable to post data to nodejs server using C# HttpClient
body: <p>I am trying to send data to node server using C#. Here is the code:</p>
  
  <p>Node + Express:</p>
  
  <pre><code>var host = "127.0.0.1";
  var port = 1337;
  var express = require("express");
  var app = express();
  
  app.get("/", function(request, response){ //root dir
      response.send("Hello!!");
  });
  
  app.post("/build", function(request, response){ //root dir
  
      response.send("This is the post method");
  });
  
  app.listen(port, host);
  </code></pre>
  
  <p>C# side:</p>
  
  <pre><code>using System.Net.Http;
  
              const string urlTemplate = "http://localhost:1337/build";
              var userQuery = new User();
              userQuery.Name = "Test";
              userQuery.Location= "Test Location";
              userQuery.Age= 26;
  
              var client = new HttpClient();
              client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json; charset=utf-8");
              client.Timeout = TimeSpan.FromMilliseconds(600000);
              var task = client.PostAsJsonAsync(urlTemplate, userQuery);
              var result = task.Result.Content.ReadAsStringAsync().Result;
  </code></pre>
  
  <p>I am able to get the response from the server. But when I try to say <code>request.body</code> to get the <code>posted</code> information back, <code>request.body is undefined</code>.</p>
  
  <p>This is how the request object looks:
  <a href="https://i.stack.imgur.com/HpnbY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HpnbY.png" alt="enter image description here"></a></p>
  
  <p>This is how <code>query and params</code> looks:
  <a href="https://i.stack.imgur.com/uXSCd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uXSCd.png" alt="enter image description here"></a></p>
  
  <p>Am I missing something?</p>