Output Stream Content
class OutputStreamContent(body: suspend OutputStream.() -> Unit, val contentType: ContentType, val status: HttpStatusCode? = null, val contentLength: Long? = null) : OutgoingContent.WriteChannelContent(source)
OutgoingContent to respond with OutputStream. The stream would be automatically closed after body finish.
Constructors
Link copied to clipboard
constructor(body: suspend OutputStream.() -> Unit, contentType: ContentType, status: HttpStatusCode? = null, contentLength: Long? = null)
Properties
Link copied to clipboard
Gets or sets the CacheControl instance as an extension property on this content.
Link copied to clipboard
Specifies content length in bytes for this resource.
Link copied to clipboard
Specifies ContentType for this resource.
Functions
Link copied to clipboard
fun OutgoingContent.compressed(contentEncoder: ContentEncoder, coroutineContext: CoroutineContext = EmptyCoroutineContext): OutgoingContent?
Returns OutgoingContent compressed with contentEncoder if possible.
Link copied to clipboard
Gets an extension property for this content
Link copied to clipboard
Check if current OutgoingContent doesn't contain content
Link copied to clipboard
Sets an extension property for this content