SubscribeRequest

@Serializable
data class SubscribeRequest(val uri: String, val _meta: JsonObject = EmptyJsonObject) : ClientRequest, WithMeta(source)

Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.

Constructors

Link copied to clipboard
constructor(uri: String, _meta: JsonObject = EmptyJsonObject)

Properties

Link copied to clipboard
open override val _meta: JsonObject

The protocol reserves this result property to allow clients and servers to attach additional metadata to their responses.

Link copied to clipboard
open override val method: Method
Link copied to clipboard
val uri: String

The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it.

Functions

Link copied to clipboard

Converts the request to a JSON-RPC request.