hi, does somebody mind pointing me at the right do...
# ktor
f
hi, does somebody mind pointing me at the right docs or method for how to access the original request (POST) body when a
ContentConverter
like the
JacksonConverter
is installed?
s
in your route you can do something like
Copy code
post("/foo") {
    call.receiveStream().use {
      // raw bytes from input body
    }
   // or
   call.receiveChannel() // will give you a ByteReadChannel primitive for the lowest level reading routine. 
}
there are many flavors of receive. When you have JSON transformer, you can do
call.receive<Foo>()
and it will attempt to deserialize payload into a
Foo
class instance
f
thank you, I will mess around with that 🙂