Hi, I'm trying out ktor and reading the <HTTP API—...
# ktor
m
Hi, I'm trying out ktor and reading the HTTP API—Ktor 1.4.0, but when I make post request it gives me Caused by: io.ktor.features.CannotTransformContentToTypeException: Cannot transform this request's content to com.example.LoginRegister
r
Looks like you dont have any ContentNegotiation feature installed
I prefer to use
kotlinx.serialization
as a
ContentNegotiation
feature
m
Thanks for the reply, if I use ContentNegotiation with serialization and make request the response is 415 Unsupported Media Type
So if I use jackson and make a request with JSON body everything works
r
check if setting
Content-Type:application/json
to your request solves the issue