title: How to query Node.js Express with curl
body: <p>I'm going to test via curl a simple application with Nodejs.</p>
  
  <p>curl command is:</p>
  
  <pre><code>curl -i -X POST -H 'Content-Type: application/json' -d '{"name": "Name"}' http://localhost:3000/users
  </code></pre>
  
  <p>and Node.js runs like:</p>
  
  <pre><code>app.post('/users', users.addUser);
  </code></pre>
  
  <p>and somewhere else in users:</p>
  
  <pre><code>exports.addUser = function(req, res) {
  console.log(req.query);
  //etc.
  </code></pre>
  
  <p>output is <code>{}</code>. req.body, instead, is undefined.</p>
  
  <p>How can I retrieve that parameters with curl? Am I missing something?</p>