github.com/stafiprotocol/go-substrate-rpc-client@v1.4.7/pkg/gethrpc/testdata/reqresp-echo.js (about)

     1  // This test calls the test_echo method.
     2  
     3  --> {"jsonrpc": "2.0", "id": 2, "method": "test_echo", "params": []}
     4  <-- {"jsonrpc":"2.0","id":2,"error":{"code":-32602,"message":"missing value for required argument 0"}}
     5  
     6  --> {"jsonrpc": "2.0", "id": 2, "method": "test_echo", "params": ["x"]}
     7  <-- {"jsonrpc":"2.0","id":2,"error":{"code":-32602,"message":"missing value for required argument 1"}}
     8  
     9  --> {"jsonrpc": "2.0", "id": 2, "method": "test_echo", "params": ["x", 3]}
    10  <-- {"jsonrpc":"2.0","id":2,"result":{"String":"x","Int":3,"Args":null}}
    11  
    12  --> {"jsonrpc": "2.0", "id": 2, "method": "test_echo", "params": ["x", 3, {"S": "foo"}]}
    13  <-- {"jsonrpc":"2.0","id":2,"result":{"String":"x","Int":3,"Args":{"S":"foo"}}}
    14  
    15  --> {"jsonrpc": "2.0", "id": 2, "method": "test_echoWithCtx", "params": ["x", 3, {"S": "foo"}]}
    16  <-- {"jsonrpc":"2.0","id":2,"result":{"String":"x","Int":3,"Args":{"S":"foo"}}}