|
|
@ -26,13 +26,13 @@ using namespace std; |
|
|
|
* 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html
|
|
|
|
* 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
string JSONRPCRequest(const string& strMethod, const UniValue& params, const UniValue& id) |
|
|
|
UniValue JSONRPCRequestObj(const string& strMethod, const UniValue& params, const UniValue& id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
UniValue request(UniValue::VOBJ); |
|
|
|
UniValue request(UniValue::VOBJ); |
|
|
|
request.push_back(Pair("method", strMethod)); |
|
|
|
request.push_back(Pair("method", strMethod)); |
|
|
|
request.push_back(Pair("params", params)); |
|
|
|
request.push_back(Pair("params", params)); |
|
|
|
request.push_back(Pair("id", id)); |
|
|
|
request.push_back(Pair("id", id)); |
|
|
|
return request.write() + "\n"; |
|
|
|
return request; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UniValue JSONRPCReplyObj(const UniValue& result, const UniValue& error, const UniValue& id) |
|
|
|
UniValue JSONRPCReplyObj(const UniValue& result, const UniValue& error, const UniValue& id) |
|
|
|