trackedBodyAsText

suspend fun HttpResponse.trackedBodyAsText(category: NetworkUsageCategory): String(source)

Reads a response as text and records its UTF-8 byte size.

Receiver

Ktor response whose text body should be counted.

Author

Dmitriy Moroz

Parameters

category

Traffic bucket that should receive the response byte count.