A simple json-rpc case for bitcoin blockchains

Posted betachen

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了A simple json-rpc case for bitcoin blockchains相关的知识,希望对你有一定的参考价值。

#!/usr/bin/env python                                                           
                                                                                
import json                                                                     
import jsonrpc                                                                  
import requests                                                                 
                                                                                
#url = "http://user:[email protected]:port/                                           
#you can find user and password in multichain.conf file in path ~/.multichain/chain2
url = "http://multichainrpc:[email protected]: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的主要内容,如果未能解决你的问题,请参考以下文章

Django JSON-RPC

简单示例用例(Simple Example Use Cases)--hive GettingStarted用例翻译

玲珑杯 Round 19 A simple math problem

Lab: File path traversal, simple case 文件路径遍历的简单案例

用java导出excel的时候,导出的excel表格里出现Error 404: SRVE0190E: File not fo

13 JSON-RPC: a tale of interfaces