public class WriterContent
extends WriteChannelContent
Represents a content that is produced by body function
OutgoingContent.ByteArrayContent, OutgoingContent.NoContent, OutgoingContent.ProtocolUpgrade, OutgoingContent.ReadChannelContent, OutgoingContent.WriteChannelContent
Constructor and Description |
---|
WriterContent(kotlin.jvm.functions.Function2<? super java.io.Writer,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object> body,
ContentType contentType,
HttpStatusCode status)
Represents a content that is produced by body function
|
Modifier and Type | Method and Description |
---|---|
ContentType |
getContentType()
Specifies
|
HttpStatusCode |
getStatus()
Status code to set when sending this content
|
java.lang.Object |
writeTo(kotlinx.coroutines.io.ByteWriteChannel channel,
kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p)
Receives channel provided by the engine and writes all data to it
|
writeTo
getContentLength, getContentType, getHeaders, getProperty, getStatus, setProperty
public WriterContent(kotlin.jvm.functions.Function2<? super java.io.Writer,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object> body, ContentType contentType, HttpStatusCode status)
Represents a content that is produced by body function
contentType
- Specifies class ContentType
for this resource.status
- Status code to set when sending this contentpublic java.lang.Object writeTo(kotlinx.coroutines.io.ByteWriteChannel channel, kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p)
Receives channel provided by the engine and writes all data to it
public ContentType getContentType()
Specifies
class ContentType
for this resource.
class ContentType
public HttpStatusCode getStatus()
Status code to set when sending this content