public class OutgoingContent
Information about the content to be sent to the peer, recognized by a client or server engine
| Modifier and Type | Class and Description |
|---|---|
static class |
OutgoingContent.ByteArrayContent
Variant of a
class OutgoingContent with payload represented as ByteArray |
static class |
OutgoingContent.NoContent
Variant of a
class OutgoingContent without a payload |
static class |
OutgoingContent.ProtocolUpgrade
Variant of a
class OutgoingContent for upgrading an HTTP connection |
static class |
OutgoingContent.ReadChannelContent
Variant of a
class OutgoingContent with payload read from ByteReadChannel |
static class |
OutgoingContent.WriteChannelContent
Variant of a
class OutgoingContent with payload written to ByteWriteChannel |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Long |
getContentLength()
Specifies content length in bytes for this resource.
|
ContentType |
getContentType()
Specifies
class ContentType for this resource. |
Headers |
getHeaders()
Headers to set when sending this content
|
<T> T |
getProperty(io.ktor.util.AttributeKey<T> key)
Gets an extension property for this content
|
HttpStatusCode |
getStatus()
Status code to set when sending this content
|
<T> void |
setProperty(io.ktor.util.AttributeKey<T> key,
T value)
Sets an extension property for this content
|
public ContentType getContentType()
Specifies class ContentType for this resource.
class ContentTypepublic java.lang.Long getContentLength()
Specifies content length in bytes for this resource.
If null, the resources will be sent as Transfer-Encoding: chunked
public HttpStatusCode getStatus()
Status code to set when sending this content
public Headers getHeaders()
Headers to set when sending this content
public <T> T getProperty(io.ktor.util.AttributeKey<T> key)
Gets an extension property for this content
public <T> void setProperty(io.ktor.util.AttributeKey<T> key,
T value)
Sets an extension property for this content