Documentation
¶
Overview ¶
Command http-server exposes a small calculator over JSON-RPC 2.0 on HTTP.
go run ./examples/http-server
Then, in another terminal:
curl -s localhost:8080/rpc -d '{"jsonrpc":"2.0","method":"add","params":{"a":2,"b":40},"id":1}'
curl -s localhost:8080/rpc -d '[{"jsonrpc":"2.0","method":"add","params":{"a":1,"b":1},"id":1},{"jsonrpc":"2.0","method":"mul","params":{"a":6,"b":7},"id":2}]'
Click to show internal directories.
Click to hide internal directories.