request

suspend fun <Res> request(block: suspend SVC.() -> Res): KRequest<Any?, Res>

Create a request by invoking a method on the target.

The response type is inferred from the return type of the invoked method.

Return

a KRequest with the correct response type

Parameters

Res

the response type (inferred from the lambda)

block

a suspend lambda that invokes a method on the target