Last active
September 30, 2017 19:42
-
-
Save ntoskrnl/28bbdf7daaac1ce242ebc2398c1ae76d to your computer and use it in GitHub Desktop.
An example of inconveniences when using JsonRpcClient
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val client: JsonRpcClient = ... | |
val request = JsonRpcRequest( | |
id = generateUniqueId(), | |
method = "myMethod", | |
params = mapOf( | |
"param1" to 100, | |
"param2" to "value", | |
"param3 to listOf(1, 2, 3) | |
) | |
) | |
val responseType = typeToken<MyResponse>() | |
val result = client.call<MyResponse>(request, responseType) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment