title: req.body is empty when making a post request via http.request
body: <p>I have a nodejs app using bodyparser(), and this route :</p>
  
  <pre><code>app.post('/users', function(req, res){
    res.json(req.body)
  })
  </code></pre>
  
  <p>when i curl</p>
  
  <pre><code>curl -X POST 127.0.0.1:3000/users -d 'name=batman'
  </code></pre>
  
  <p>server sends back this json :</p>
  
  <pre><code>{ name: 'batman' }
  </code></pre>
  
  <p>my problem is when trying to make the same request with http.request, req.body is empty
  i'm doing the same call though, here is a test.js file that i run with node :</p>
  
  <pre><code>var http = require('http');
  
  var options = {
    host: '127.0.0.1',
    port: 3000,
    path: '/api/users',
    method: 'POST'
  };
  
  var request = http.request(options, function (response) {
    var str = '';
    response.on('data', function (chunk) {
      str += chunk;
    });
  
    response.on('end', function () {
      console.log(str);
    });
  });
  
  request.end("name=batman");
  </code></pre>
  
  <p>request body is empty -> <code>{}</code></p>
  
  <p>why ? i've tried setting content-length but does not do anything.</p>