core / pragma.utils / receiveEncodedTextUsingIOContext /

receiveEncodedTextUsingIOContext #

suspend fun ApplicationCall.receiveEncodedTextUsingIOContext(): String

Receive the request as a string.

If there’s no Content-Type in the HTTP header specified, use ISO_8859_1 as default charset - see https://www.w3.org/International/articles/http-charset/index#charset.

Use UTF-8 as default charset for application/JSON - see https://tools.ietf.org/html/rfc4627#section-3.

From the bug thread in Ktor GitHub issue - https://github.com/ktorio/ktor/issues/384.