respondSource

suspend fun ApplicationCall.respondSource(source: Source, contentType: ContentType? = null, status: HttpStatusCode? = null)

Responds to an ApplicationCall with the content from the provided kotlinx-io Source.

Parameters

source

The binary data source of the content to be responded with.

contentType

An optional ContentType, unspecified by default

status

An optional HttpStatusCode, default is HttpStatusCode.OK