HttpEntity

play.api.http.HttpEntity
See theHttpEntity companion object
sealed trait HttpEntity

An HTTP entity.

HTTP entities come in three flavors, HttpEntity.Strict, HttpEntity.Streamed and HttpEntity.Chunked.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Chunked
class Streamed
class Strict

Members list

Value members

Abstract methods

def as(contentType: String): HttpEntity

Return this entity as the given content type.

Return this entity as the given content type.

Attributes

def asJava: HttpEntity

Convert this entity to its Java counterpart.

Convert this entity to its Java counterpart.

Attributes

The content length of the entity, if known.

The content length of the entity, if known.

Attributes

The content type of the entity, if known.

The content type of the entity, if known.

Attributes

The entity as a data stream.

The entity as a data stream.

Attributes

Whether it is known if this entity is empty or not.

Whether it is known if this entity is empty or not.

If this returns true, then the entity is definitely empty. If it returns false, the entity may or may not be empty.

Attributes

Concrete methods

def consumeData(implicit mat: Materializer): Future[ByteString]

Consume the data from this entity.

Consume the data from this entity.

Attributes