From 6ae5d6f4f93ec07f8292d20780ec52acc8b5603f Mon Sep 17 00:00:00 2001 From: Maxime Van Hees Date: Thu, 23 Oct 2025 15:42:05 +0200 Subject: [PATCH] testing RPC over Unix socket + updated docs --- docs/basics.md | 4 +--- docs/rpc_examples.md | 8 +------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/basics.md b/docs/basics.md index 621e29b..bee4c4a 100644 --- a/docs/basics.md +++ b/docs/basics.md @@ -29,10 +29,8 @@ Test the IPC endpoint interactively with socat (non-HTTP transport): ```bash sudo socat -d -d -t 5 - UNIX-CONNECT:/tmp/herodb.sock ``` -Then paste a framed JSON-RPC request (Content-Length header, blank line, then JSON body). Example: +Then paste a framed JSON-RPC request. Example: ``` -Content-Length: 73 - {"jsonrpc":"2.0","method":"hero_listDatabases","params":[],"id":3} ``` More IPC examples are in [docs/rpc_examples.md](docs/rpc_examples.md). diff --git a/docs/rpc_examples.md b/docs/rpc_examples.md index 2e5e86d..96d280f 100644 --- a/docs/rpc_examples.md +++ b/docs/rpc_examples.md @@ -158,10 +158,4 @@ sudo socat -d -d -t 5 - UNIX-CONNECT:/tmp/herodb.sock 2) Paste a framed JSON-RPC request (Content-Length header, then a blank line, then the JSON body). For example to call hero_listDatabases: -Content-Length: <LEN-BYTES-OF-JSON> - -{"jsonrpc":"2.0","id":3,"method":"hero_listDatabases","params":[]} - -Notes: -- Replace <LEN-BYTES-OF-JSON> with the byte-length of the exact JSON payload you paste. There must be an empty line between the header and the JSON. -- The response will appear in the same terminal, also framed with Content-Length. \ No newline at end of file +{"jsonrpc":"2.0","id":3,"method":"hero_listDatabases","params":[]} \ No newline at end of file