#include <iostream>#include <sstream>#include "Fetch.h"using namespace std;int main(void){Config config("http://120.24.7.188:8082", "seraagaldnialaldshgadl12312lasdfaaa");config.setUserAuthKey("from cpp client init");try {Fetch fetch(config);string apiName = "server.ctl.main.Test";// 接口名称string workerName = "t5";// 请求参数vector<string> params;params.insert(params.begin(), "aa大哥");// 查看原始数据//string response = fetch.sendRequest(apiName, workerName, params);//Json::Value response = fetch.getString(apiName, workerName, params);string response = fetch.getString(apiName, workerName, params);cout << " res: " << response << endl;vector<string> paramsEmpty;// params.insert(params.begin(), "aa");//Json::Value response2 = fetch.getObject("server.ctl.dama.Dama", "getNeedToDamaList", paramsEmpty);Json::Value response2 = fetch.getObject("server.ctl.dama.Dama", "getNeedToDamaList", params);cout << " res2: " << response2 << endl;} catch (ServerResponseException & e) {cout << "catch: " << e.msg;}return 0;}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。