public static final class HttpEntity.Strict extends HttpEntity
HttpEntity.Chunked, HttpEntity.Streamed, HttpEntity.Strict
NO_ENTITY
Constructor and Description |
---|
Strict(akka.util.ByteString data,
java.util.Optional<java.lang.String> contentType) |
Modifier and Type | Method and Description |
---|---|
HttpEntity |
as(java.lang.String contentType) |
play.api.http.HttpEntity |
asScala() |
java.util.Optional<java.lang.Long> |
contentLength() |
java.util.Optional<java.lang.String> |
contentType() |
akka.util.ByteString |
data() |
akka.stream.javadsl.Source<akka.util.ByteString,?> |
dataStream() |
boolean |
isKnownEmpty() |
chunked, consumeData, fromContent, fromString
public Strict(akka.util.ByteString data, java.util.Optional<java.lang.String> contentType)
public akka.util.ByteString data()
public java.util.Optional<java.lang.String> contentType()
contentType
in class HttpEntity
public boolean isKnownEmpty()
isKnownEmpty
in class HttpEntity
public java.util.Optional<java.lang.Long> contentLength()
contentLength
in class HttpEntity
public HttpEntity as(java.lang.String contentType)
as
in class HttpEntity
contentType
- the content type to use, i.e. "text/html".public akka.stream.javadsl.Source<akka.util.ByteString,?> dataStream()
dataStream
in class HttpEntity
public play.api.http.HttpEntity asScala()
asScala
in class HttpEntity