rpc

fun HttpClient.rpc(urlString: String, block: HttpRequestBuilder.() -> Unit = {}): KtorRpcClient(source)

Configures KtorRpcClient for the following path. Provides means for additional configuration via block. Note that the WebSockets plugin is required for these calls.

Return

An instance of KtorRpcClient that is configured to send messages to the server. The instance is cold and will establish WebSocket connection on the first request.

Parameters

urlString

The URL to use for the request.

block

Optional configuration for the HttpRequestBuilder.

See also


fun HttpClient.rpc(block: HttpRequestBuilder.() -> Unit = {}): KtorRpcClient(source)

Configures KtorRpcClient for the following path. Provides means for additional configuration via block. Note that the WebSockets plugin is required for these calls.

Return

An instance of KtorRpcClient that is configured to send messages to the server. The instance is cold and will establish WebSocket connection on the first request.

Parameters

block

Optional configuration for the HttpRequestBuilder.

See also