Nir Golan
03/14/2020, 10:28 PMfun Route.phrase(db: Repository) {
post(PHRASE_ENDPOINT) {
val request = call.receive<Request>()
val phrase = db.add(EmojiPhrase(request.emoji, request.phrase))
call.respond(phrase)
}
}
when i call it with postman: localhost:8080/api/v1/phrase with body of:
{
"emoji": "qazwsx",
"phrase": "qazwsx"
}
i get : kotlinx/coroutines/io/ByteReadChannel
any ideas?