dongshedan4672
dongshedan4672
2012-01-13 17:27

开始-JSON-RPC-“冒号太多”

已采纳

I'm trying to call a HTTP JSON-RPC server for Bitcoin using Go (not on GAE), but I get error of

dial tcp http://user:pass@127.0.0.1:8332: too many colons in address

or

dial ip http://user:pass@127.0.0.1:8332: lookup http://user:pass@127.0.0.1:8332: no such host

I tried various network configurations, but couldn't get anything going. When I just typed the address into the browser, I got a response from the server:

{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

Which looks like a proper response for an empty call.

How do I correctly call that HTTP JSON-RPC server in Go?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

相关推荐