John Pali
10/15/2021, 12:19 PMcall.receiveText()
but it gets is to a string - had a look on the docs about serialization, but got quite confused there.Big Chungus
10/15/2021, 12:26 PMBig Chungus
10/15/2021, 12:26 PMMatteo Mirk
10/15/2021, 12:28 PMimport io.ktor.features.*
// ...
fun main() {
embeddedServer(Netty, port = 8080) {
install(ContentNegotiation)
// ...
}.start(wait = true)
}
then register a converter, for example Jackson
https://ktor.io/docs/jackson.html#register_jackson_converter. Then you execute what Martynas wrote above, yeah ⬆️Matteo Mirk
10/15/2021, 12:29 PMAleksei Tirman [JB]
10/15/2021, 12:58 PMJohn Pali
10/15/2021, 3:00 PMcall.receive<Entity>()
I get error that some values are not provided...Big Chungus
10/15/2021, 3:02 PMJohn Pali
10/15/2021, 3:02 PMEntity:
id: Int,
user: User,
value: String,
computedValue: String
and Entity is a DAO for an EntityTable
The problem is that calling call.recieve<Entity>()
yells that I didn't provide id, user, computedValue
in the payloadBig Chungus
10/15/2021, 3:03 PMJohn Pali
10/15/2021, 3:03 PMJohn Pali
10/15/2021, 3:03 PMJohn Pali
10/15/2021, 3:03 PMBig Chungus
10/15/2021, 3:04 PMJohn Pali
10/15/2021, 3:04 PM