【发布时间】:2012-01-13 17:27:04
【问题描述】:
我正在尝试使用 Go(不是在 GAE 上)调用 HTTP JSON-RPC server for Bitcoin,但我收到错误
dial tcp http://user:pass@127.0.0.1:8332: too many colons in address
或
dial ip http://user:pass@127.0.0.1:8332: lookup http://user:pass@127.0.0.1:8332: no such host
我尝试了各种network configurations,但无济于事。当我刚刚在浏览器中输入地址时,我得到了服务器的响应:
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}
这看起来像是对空呼叫的正确响应。
如何在 Go 中正确调用 HTTP JSON-RPC 服务器?
【问题讨论】:
标签: http communication go json-rpc