aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/protocol.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-10-19 15:01:33 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-10-19 15:15:49 +0200
commit97c7f7362f9b59247753d6e8fa8022a6205f9c09 (patch)
tree19dcb95789fea3e6d168a7b2e1ecb7d66a5e006f /src/rpc/protocol.cpp
parentd736a6eb1f91ba88059ff41634bd4ea715d9a1f1 (diff)
parente7156ad61be2fe935fdb64e9d0e877fa0e9f7f9e (diff)
downloadbitcoin-97c7f7362f9b59247753d6e8fa8022a6205f9c09.tar.xz
Merge #8788: [RPC] Give RPC commands more information about the RPC request
e7156ad [RPC] pass HTTP basic authentication username to the JSONRequest object (Jonas Schnelli) 69d1c25 [RPC] Give RPC commands more information about the RPC request (Jonas Schnelli) 23c32a9 rpc: Change JSONRPCRequest to JSONRPCRequestObj (Wladimir J. van der Laan)
Diffstat (limited to 'src/rpc/protocol.cpp')
-rw-r--r--src/rpc/protocol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp
index bb885bb5a6..ec186f4fc5 100644
--- a/src/rpc/protocol.cpp
+++ b/src/rpc/protocol.cpp
@@ -26,13 +26,13 @@ using namespace std;
* 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);
request.push_back(Pair("method", strMethod));
request.push_back(Pair("params", params));
request.push_back(Pair("id", id));
- return request.write() + "\n";
+ return request;
}
UniValue JSONRPCReplyObj(const UniValue& result, const UniValue& error, const UniValue& id)