reqresp-echo.js 886 B

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