THRIFT-2493:Node.js lib needs HTTP client
Client: node
Patch: Randy Abernethy

Clean up of many jshint warnings/errors, jsdoc for HttpConnect,
added support for https and Python to HttpConnect, added tests
for HttpConnect with https and promises.
diff --git a/lib/nodejs/test/http_client.js b/lib/nodejs/test/http_client.js
index 08a7d27..14c1a29 100644
--- a/lib/nodejs/test/http_client.js
+++ b/lib/nodejs/test/http_client.js
@@ -55,23 +55,22 @@
    path: "/test"
 };
 
-var connection = undefined;
-
 if (program.ssl) {
-  options.rejectUnauthorized = false;
-  connection = thrift.createHttpConnection("localhost", 9090, options);
-} else {
-  connection = thrift.createHttpConnection("localhost", 9090, options);
-}
+  options.nodeOptions = { rejectUnauthorized: false };
+  options.https = true;
+} 
+
+var connection = thrift.createHttpConnection("localhost", 9090, options);
 
 var client = thrift.createHttpClient(ThriftTest, connection);
 
-//connection.on('error', function(err) {
-//  assert(false, err);
-//});
+connection.on('error', function(err) {
+  assert(false, err);
+});
 
 var testDriver = ThriftTestDriver;
 if (program.promise) {
+  console.log("    --Testing promise style client");
   testDriver = ThriftTestDriverPromise;
 } 
 testDriver(client, function (status) {