diff --git a/lib/RpcClient.js b/lib/RpcClient.js index 8d506bb..3d1c39f 100644 --- a/lib/RpcClient.js +++ b/lib/RpcClient.js @@ -15,6 +15,7 @@ function RpcClient(opts) { this.protocol = (opts.protocol == 'http') ? http : https; this.batchedCalls = null; this.disableAgent = opts.disableAgent || false; + this.rejectUnauthorized = opts.rejectUnauthorized || false; } RpcClient.prototype.batch = function(batchCallback, resultCallback) { @@ -163,6 +164,7 @@ function rpc(request, callback) { path: '/', method: 'POST', port: self.port, + rejectUnauthorized: self.rejectUnauthorized, agent: self.disableAgent ? false : undefined, }; if (self.httpOptions) {