#!/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的更多相关文章

  1. 測试JSON RPC远程调用(JSONclient)

    #include <string> #include <iostream> #include <curl/curl.h> /* 标题:JSonclient Auth ...

  2. [转]bitcoin API reference (JSON-RPC)

    本文转自:https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29#Node.js API reference (JSON-RPC)     Co ...

  3. Yar - Yet Another RPC framework for PHP

    Introduction Yar is a RPC framework which aims to provide a simple and easy way to do communication ...

  4. 以太坊RPC机制与API实例

    上一篇文章介绍了以太坊的基础知识,我们了解了web3.js的调用方式是通过以太坊RPC技术,本篇文章旨在研究如何开发.编译.运行与使用以太坊RPC接口. 关键字:以太坊,RPC,JSON-RPC,cl ...

  5. JSON 的含义?

    JSON 的全称是 JavaScript Object Notation,是一种轻量级的数据交换格式.JS ON 与 XML 具有相同的特性,例如易于人编写和阅读,易于机器生成和解析.但是 JSON ...

  6. Json循环引用问题

    154down votefavorite 27 I am trying to do a simple JSON return but I am having issues I have the fol ...

  7. JSONPath - XPath for JSON

    http://goessner.net/articles/JsonPath/ [edit] [comment] [remove] |2007-02-21| e1 # JSONPath - XPath ...

  8. golang RPC通信读写超时设置

    golang RPC通信中,有时候就怕读写hang住. 那是否可以设置读写超时呢? 1.方案一: 设置连接的读写超时 1.1 client RPC通信基于底层网络通信,可以通过设置connection ...

  9. Java版本:识别Json字符串并分隔成Map集合

    前言: 最近又看了点Java的知识,于是想着把CYQ.Data V5迁移到Java版本. 过程发现坑很多,理论上看大部分很相似,实践上代码写起来发现大部分都要重新思考方案. 遇到的C#转Java的一些 ...

随机推荐

  1. position containing block原点

    如果元素有属性 'position:absolute',containing block 由最近的 position 不是 static 的祖先建立,按下面的步骤:        1.如果祖先是块级元 ...

  2. hibernate导入大量数据时,为了避免内存中产生大量对象,在编码时注意什么,如何去除?

    Session session = sessionFactory.openSession(); Transaction tx = session.beginTransaction(); for ( i ...

  3. 【转】给Winform的button等控件添加快捷键

    ref: http://blog.sina.com.cn/s/blog_4cb9953f0100cy4z.html 第一种:Alt + *(按钮快捷键) 在大家给button.label.menuSt ...

  4. C# SocketHelper 源码

    玄机论坛Socket类库源码+Demo 本类库采用C# TcpLister,TcpClient高度封装,采用C# NetworkStream进行异步模式读取数据.采用C# Semaphore来进行并发 ...

  5. 修改zepto源代码,使支持wp8的ie10

    注意:当前1.1.3版本的zepto,已经有模块来支持wp8 原先的zepto,通过__proto__赋值,来使dom继承到$.fn方法, 无奈IE11之前的IE10,IE9不支持这种写法, 所以我们 ...

  6. 转 Linux命令及Linux终端的20个趣事

    https://linux.cn/article-2831-1.html 1. 命令:sl (蒸汽机车) 你可能了解 ‘ls’ 命令,并经常使用它来查看文件夹的内容.但是,有些时候你可能会拼写成 ‘s ...

  7. 提高 Discuz 门户文章被百度收录的方法

    如果你了解 SEO,你就该清楚使用 canonical URL 标签可以固定网页标准地址,可以提高网页的权重,有利于搜索引擎收录. 例如我的网站拥有两个子域名www.bbseat.com.cn和bbs ...

  8. Using jQuery to add a dynamic “Back To Top” floating button with smooth scroll

    Ever read a really long blog post or article and then had to scroll all the way up to the top of the ...

  9. 约束的DEFERRABLE, NOT DEFERRABLE, INITIALLY IMMEDIATE 和 INITIALLY DEFERRED

    [ CONSTRAINT constraint_name ] { NOT NULL |   NULL |   CHECK ( expression ) [ NO INHERIT ] |   DEFAU ...

  10. (转)《深入理解java虚拟机》学习笔记9——并发编程(一)

    随着多核CPU的高速发展,为了充分利用硬件的计算资源,操作系统的并发多任务功能正变得越来越重要,但是CPU在进行计算时,还需要从内存读取输出,并将计算结果存放到内存中,然而由于CPU的运算速度比内存高 ...