title: Create HTTPS client in NodeJS
body: <p>I've been having a heck of a time figuring out how to use Node.js (v0.3.8) to securely connect to an HTTP server. I have the following code:</p>
  
  <pre><code>var http = require("http");
  var client = http.createClient(443, host, /* secure= */ true);
  var request = client.request("GET", relativeUrl, { host: host });
  </code></pre>
  
  <p>When I run it, I get:</p>
  
  <pre><code>node.js:116
          throw e; // process.nextTick error, or 'error' event on first tick
          ^
  Error: Parse Error
      at Client.onData [as ondata] (http.js:1287:27)
      at Client._onReadable (net.js:648:27)
      at IOWatcher.onReadable [as callback] (net.js:156:10)
  </code></pre>
  
  <p>I've been Googling for answers for the past half hour, and have read the documentation at <a href="http://nodejs.org/" rel="noreferrer">http://nodejs.org/</a> .  What am I missing?</p>