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
+19
View File
@@ -0,0 +1,19 @@
#include <cppunit/extensions/HelperMacros.h>
#include "rpc/command_map.h"
#include "rpc/jsonrpc.h"
class JsonrpcTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(JsonrpcTest);
CPPUNIT_TEST(test_basics);
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
void tearDown() {}
void test_basics();
private:
rpc::JsonRpc m_jsonrpc;
};