1.1.2 • Published 8 years ago

think-jsonrpc v1.1.2

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

think-jsonrpc

Install

npm install think-jsonrpc

How to use

配置:src/common/config/config.js

jsonrpc: {
        url: "http://192.168.20.30:8080/json.rpc",
        appName: "trade_control",
        serviceName: "trade_service",
        filter: function (reqObj) { //过滤处理请求参数,此属性可省略
            reqObj.headers.userid = 0; //获取userid代码
            return reqObj;
        }
    }

使用

let data = await jsonrpc.call("xxx", "xxx", 1, 1, 2); //jsonrpc.call("类别名","方法名",...方法使用的参数)
console.log(data.body);

LICENSE

MIT

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago