respondText
suspend fun ApplicationCall.respondText(text: String, contentType: ContentType? = null, status: HttpStatusCode? = null, configure: OutgoingContent.() -> Unit = {})
Responds to a client with a plain text response.
Parameters
contentType
is an optional ContentType, default is ContentType.Text.Plain
status
is an optional HttpStatusCode, default is HttpStatusCode.OK
See also
suspend fun ApplicationCall.respondText(contentType: ContentType? = null, status: HttpStatusCode? = null, provider: suspend () -> String)
Responds to a client with a plain text response, using the specified provider to build a text.
Parameters
contentType
is an optional ContentType, default is ContentType.Text.Plain
status
is an optional HttpStatusCode, default is HttpStatusCode.OK