rpc_request

Macro rpc_request 

Source
macro_rules! rpc_request {
    ($method:expr, $params:expr, $id:expr) => { ... };
    ($method:expr, $id:expr) => { ... };
    ($method:expr) => { ... };
}
Expand description

Create a JSON-RPC request

§Usage:

// Request with method, params and ID
rpc_request!("add", [5, 3], 1)

// Request with method and ID (no params)
rpc_request!("ping", 2)

// Request with method only (notification - no ID)
rpc_request!("log")