rocketraman
06/27/2018, 4:15 PMcall.response.contentType(ContentType.Application.Json.withCharset(Charsets.UTF_8))
as per https://ktor.io/servers/responses.html#properties, but get the Exception io.ktor.response.UnsafeHeaderException: Header Content-Type is controlled by the engine and cannot be set explicitly
. How can I send JSON? I don't have ContentNegotiation
installed, and don't want it.cy
06/27/2018, 4:16 PMDeactivated User
06/27/2018, 4:16 PMcall.respondText
, you can set the contentType as an optional argument of that method.cy
06/27/2018, 4:16 PMDeactivated User
06/27/2018, 4:17 PMcy
06/27/2018, 4:17 PMcontentType
extension functionrocketraman
06/27/2018, 4:18 PMcy
06/27/2018, 4:24 PMcy
06/27/2018, 4:25 PMDeactivated User
06/27/2018, 4:26 PM