Hello all,
I'd really be thankful for some help in getting my JSON RPC client to actually get to talk to my bitcoin daemon.
Basically, I've been actively trying different JSON client with pretty much the same results... 401 Unauthorized...
I've also tried the Curl based example from the docs which is working as a charm, so I'm really wondering wth i'm doing wrong...
Nothing helpful found in the debug.log (I can re-symlink it to /dev/null now
)
Would anyone be kind enough to have a little look at my code and/or give me a couple of pointers ?
Thank you very much
irb(main):009:0> client = JsonRPC::Client.new("http://admin:passsword@localhost:8332/")
=> #>
irb(main):010:0> client.request 'getbalance', {}
JSON::ParserError: 705: unexpected token at '"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
Error
401 Unauthorized.
'
from /usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in `parse'
from /usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in `parse'
from /usr/lib/ruby/gems/1.8/gems/jsonrpc-0.9.2/lib/jsonrpc.rb:20:in `request'
from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
from /usr/lib/ruby/1.8/net/http.rb:440:in `start'
from /usr/lib/ruby/gems/1.8/gems/jsonrpc-0.9.2/lib/jsonrpc.rb:19:in `request'
from (irb):10
Contents of my bitcoin.conf
rpcpassword=password
rpcuser=admin