11/*
2- * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
2+ * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33 */
44
55@file:Suppress(" unused" )
@@ -13,7 +13,6 @@ import io.ktor.server.util.*
1313import io.ktor.util.reflect.*
1414import io.ktor.utils.io.*
1515import io.ktor.utils.io.charsets.*
16- import io.ktor.utils.io.core.*
1716import kotlinx.io.*
1817import kotlin.jvm.*
1918
@@ -121,8 +120,8 @@ public suspend inline fun ApplicationCall.respondRedirect(permanent: Boolean = f
121120 * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.server.response.respondText)
122121 *
123122 * @see [io.ktor.server.response.ApplicationResponse]
124- * @param contentType is an optional [ContentType], default is [ContentType.Text.Plain]
125- * @param status is an optional [HttpStatusCode], default is [HttpStatusCode.OK]
123+ * @param contentType An optional [ContentType], defaults to [ContentType.Text.Plain]
124+ * @param status An optional [HttpStatusCode], defaults to [HttpStatusCode.OK] unless already assigned
126125 */
127126public suspend fun ApplicationCall.respondText (
128127 text : String ,
@@ -140,8 +139,8 @@ public suspend fun ApplicationCall.respondText(
140139 * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.server.response.respondText)
141140 *
142141 * @see [io.ktor.server.response.ApplicationResponse]
143- * @param contentType is an optional [ContentType], default is [ContentType.Text.Plain]
144- * @param status is an optional [HttpStatusCode], default is [HttpStatusCode.OK]
142+ * @param contentType An optional [ContentType], defaults to [ContentType.Text.Plain]
143+ * @param status An optional [HttpStatusCode], defaults to [HttpStatusCode.OK] unless already assigned
145144 */
146145public suspend fun ApplicationCall.respondText (
147146 contentType : ContentType ? = null,
@@ -158,8 +157,8 @@ public suspend fun ApplicationCall.respondText(
158157 * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.server.response.respondBytes)
159158 *
160159 * @see [io.ktor.server.response.ApplicationResponse]
161- * @param contentType is an optional [ContentType], unspecified by default
162- * @param status is an optional [HttpStatusCode], default is [HttpStatusCode.OK]
160+ * @param contentType An optional [ContentType], unspecified by default
161+ * @param status An optional [HttpStatusCode], defaults to [HttpStatusCode.OK] unless already assigned
163162 */
164163public suspend fun ApplicationCall.respondBytes (
165164 contentType : ContentType ? = null,
@@ -175,8 +174,8 @@ public suspend fun ApplicationCall.respondBytes(
175174 * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.server.response.respondBytes)
176175 *
177176 * @see [io.ktor.server.response.ApplicationResponse]
178- * @param contentType is an optional [ContentType], unspecified by default
179- * @param status is an optional [HttpStatusCode], default is [HttpStatusCode.OK]
177+ * @param contentType An optional [ContentType], unspecified by default
178+ * @param status An optional [HttpStatusCode], defaults to [HttpStatusCode.OK] unless already assigned
180179 */
181180public suspend fun ApplicationCall.respondBytes (
182181 bytes : ByteArray ,
@@ -195,7 +194,7 @@ public suspend fun ApplicationCall.respondBytes(
195194 *
196195 * @param source The binary data source of the content to be responded with.
197196 * @param contentType An optional [ContentType], unspecified by default
198- * @param status An optional [HttpStatusCode], default is [HttpStatusCode.OK]
197+ * @param status An optional [HttpStatusCode], defaults to [HttpStatusCode.OK] unless already assigned
199198 * @param contentLength An optional value included in the Content-Length header, also truncating content
200199 */
201200public suspend fun ApplicationCall.respondSource (
@@ -218,6 +217,11 @@ public suspend fun ApplicationCall.respondSource(
218217 * The provided [ByteWriteChannel] will be closed automatically.
219218 *
220219 * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.server.response.respondBytesWriter)
220+ *
221+ * @param contentType An optional [ContentType], unspecified by default
222+ * @param status An optional [HttpStatusCode], defaults to [HttpStatusCode.OK] unless already assigned
223+ * @param contentLength An optional value included in the Content-Length header, also truncating content
224+ * @param producer A function producing content.
221225 */
222226public suspend fun ApplicationCall.respondBytesWriter (
223227 contentType : ContentType ? = null,
0 commit comments