default host to 'localhost'; port to '8332'

fix GH-6
This commit is contained in:
freewil 2014-01-08 15:00:03 -08:00
parent 39c4ebb0b7
commit 8f4f522b47

View File

@ -34,12 +34,12 @@ Client.prototype.call = function(method, params, callback, errback, path) {
// prepare request options
var requestOptions = {
host: this.opts.host,
port: this.opts.port,
host: this.opts.host || 'localhost',
port: this.opts.port || 8332,
method: 'POST',
path: path || '/',
headers: {
'Host': this.opts.host,
'Host': this.opts.host || 'localhost',
'Content-Length': requestJSON.length
},
agent: false,