1.1.2 • Published 9 years ago

think-jsonrpc v1.1.2

Weekly downloads
1
License
MIT
Repository
-
Last release
9 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

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago