title: Convert cURL request to request of node.js
body: <p>Here is my valid cURL command:</p>
  
  <pre><code>curl 'https://www.example.com/api/' --data '{"jsonrpc":"2.0","method":"getObjectsByFilter","id":"3"}'
  </code></pre>
  
  <p>here is what I tried in Node.js:</p>
  
  <pre><code>var url = 'https://www.example.com/api/';
  
  var data = {
    "jsonrpc":"2.0",
    "id":"3"
  };
  
  req.post({ url: url, form: data}, function (err, result, body) {
  </code></pre>
  
  <p>But it is not valid.</p>