1 Star 0 Fork 0

OpenCodeShare/libjson-rpc-cpp

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
simpleclient.cpp 564 Bytes
一键复制 编辑 原始数据 按行查看 历史
Peter Spiess-Knafl 提交于 2017-08-27 02:33 +08:00 . Applied formatting
/**
* @file simpleclient.cpp
* @date 03.01.2013
* @author Peter Spiess-Knafl <dev@spiessknafl.at>
* @brief This is a simple client example.
*/
#include <iostream>
#include <jsonrpccpp/client.h>
#include <jsonrpccpp/client/connectors/httpclient.h>
using namespace jsonrpc;
using namespace std;
int main() {
HttpClient client("http://localhost:8383");
Client c(client);
Json::Value params;
params["name"] = "Peter";
try {
cout << c.CallMethod("sayHello", params) << endl;
} catch (JsonRpcException &e) {
cerr << e.what() << endl;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/OpenCodeShare/libjson-rpc-cpp.git
git@gitee.com:OpenCodeShare/libjson-rpc-cpp.git
OpenCodeShare
libjson-rpc-cpp
libjson-rpc-cpp
master

搜索帮助