diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-09-22 09:46:41 +0200 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-10-19 14:42:08 +0200 |
commit | 69d1c25768a8649bfc7eb8e9c35b8fe9874ac9fc (patch) | |
tree | 88c4ef2720fc4e88d080c6fc480c341bf118a985 /src/httprpc.cpp | |
parent | 23c32a9694e119f957c124f4501294ae7a5fd99a (diff) |
[RPC] Give RPC commands more information about the RPC request
Diffstat (limited to 'src/httprpc.cpp')
-rw-r--r-- | src/httprpc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp index 6a6c5276cc..54651911aa 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -172,19 +172,22 @@ static bool HTTPReq_JSONRPC(HTTPRequest* req, const std::string &) return false; } - JSONRequest jreq; + JSONRPCRequest jreq; try { // Parse request UniValue valRequest; if (!valRequest.read(req->ReadBody())) throw JSONRPCError(RPC_PARSE_ERROR, "Parse error"); + // Set the URI + jreq.URI = req->GetURI(); + std::string strReply; // singleton request if (valRequest.isObject()) { jreq.parse(valRequest); - UniValue result = tableRPC.execute(jreq.strMethod, jreq.params); + UniValue result = tableRPC.execute(jreq); // Send reply strReply = JSONRPCReply(result, NullUniValue, jreq.id); |