title: Node.js https.post request
body: <p>I am using Node.js and I need to send a POST request containing specific data to an external server. I am doing the same thing with GET, but this is a lot easier since I don't have to include the additional data. So, my working GET request looks like:</p>
  
  <pre><code>var options = {
      hostname: 'internetofthings.ibmcloud.com',
      port: 443,
      path: '/api/devices',
      method: 'GET',
      auth: username + ':' + password
  };
  https.request(options, function(response) {
      ...
  });
  </code></pre>
  
  <p>So I was wondering how to do the same thing with POST request, including data such as:</p>
  
  <pre><code>type: deviceType,
  id: deviceId,
  metadata: {
      address: {
          number: deviceNumber,
          street: deviceStreet
      }
  }
  </code></pre>
  
  <p>Could anyone tell me how to include this data to the options above? Thanks in advance!</p>