Skip to main content

jsonrpc_handler

Function jsonrpc_handler 

Source
pub async fn jsonrpc_handler(
    __arg0: State<Arc<RequestHandler>>,
    __arg1: Json<JsonRpcRequest>,
) -> Response<Body>
Available on crate features a2a-v1 and server only.
Expand description

Axum handler for A2A v1.0.0 JSON-RPC requests.

Deserializes the incoming JsonRpcRequest, dispatches to the appropriate RequestHandler method, and returns either a JSON response or an SSE stream for streaming methods.