JSONRPCRequest
data class JSONRPCRequest @JvmOverloads constructor(val id: RequestId = RequestId(Uuid.random().toHexString()), val method: String, val params: JsonElement? = null) : JSONRPCMessage(source)
A request that expects a response.
Requests are identified by a unique id and specify a method to invoke. The server or client (depending on a direction) must respond with either a JSONRPCResponse or JSONRPCError that has the same id.
Constructors
Link copied to clipboard
constructor(id: RequestId = RequestId(Uuid.random().toHexString()), method: String, params: JsonElement? = null)
Secondary constructor for creating a JSONRPCRequest using a string-based ID.
Constructs a JSON-RPC request using a numerical ID, method name, and optional parameters.
Properties
Functions
Link copied to clipboard
Decodes a JSON-RPC request into a protocol-specific Request.