module JsonRpc::Handler

Overview

Handler used by Client to handle requests.

Direct including types

Defined in:

json_rpc/handler.cr

Instance Method Summary

Instance Method Detail

def handle_rpc_call(client : JsonRpc::Client, request : JsonRpc::Request, raw : String) #

Called when a request has been received. Implementations have to return what to respond, or can raise a LocalCallError which is automatically turned into an error response.

Raising any other error will be caught in Client#invoke_locally.

The default implementation always responds with an unknown method error.


[View source]