标签:
#!/usr/bin/env python import json import jsonrpc import requests #url = "http://user:password@ip:port/ #you can find user and password in multichain.conf file in path ~/.multichain/chain2 url = "http://multichainrpc:H4MvpnyZix9ynkJ3T8om8PtKziF7CtVtAH7WkZ3eRK1u@localhost:4352/" headers = {‘content-type‘: ‘application/json‘} helpload = { "jsonrpc":"1.0", "method": "getinfo", } print "------ test begin --------" response = requests.post(url, data=json.dumps(helpload), headers=headers).json() print response
A simple json-rpc case for bitcoin blockchains
标签:
原文地址:http://www.cnblogs.com/clor001/p/5242055.html