Add JSON-RPC capability

Inline nlohmann/json for the JSON parsing itself, and handle requests
with the same SCGI interface as XML-RPC.

Based off the work in https://github.com/jesec/rtorrent
This commit is contained in:
kannibalox
2025-01-04 20:50:55 -05:00
committed by Jari Sundell
parent 78915746ee
commit 9f48226663
30 changed files with 26375 additions and 307 deletions
+2 -1
View File
@@ -51,6 +51,7 @@
#include <torrent/object.h>
#include <torrent/exceptions.h>
#include "rpc_manager.h"
#include "xmlrpc.h"
#include "parse_commands.h"
@@ -138,7 +139,7 @@ rpc::target_type
xmlrpc_to_target(xmlrpc_env* env, xmlrpc_value* value, int callType) {
rpc::target_type target;
XmlRpc::object_to_target(xmlrpc_to_object(env, value, -1, nullptr), callType, &target);
Rpc::object_to_target(xmlrpc_to_object(env, value, -1, nullptr), callType, &target);
return target;
}