Package akka.http.scaladsl.model
Interface UniversalEntity
-
- All Superinterfaces:
BodyPartEntity
,BodyPartEntity
,HttpEntity
,HttpEntity
,RequestEntity
,RequestEntity
,ResponseEntity
,ResponseEntity
,UniversalEntity
- All Known Implementing Classes:
HttpEntity.Default
,HttpEntity.Strict
public interface UniversalEntity extends UniversalEntity, RequestEntity, BodyPartEntity
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.http.javadsl.model.HttpEntity
HttpEntity.Chunked, HttpEntity.ChunkStreamPart, HttpEntity.CloseDelimited, HttpEntity.Default, HttpEntity.DiscardedEntity, HttpEntity.IndefiniteLength, HttpEntity.Strict
-
Nested classes/interfaces inherited from interface akka.http.scaladsl.model.HttpEntity
HttpEntity.Chunk, HttpEntity.Chunk$, HttpEntity.Chunked, HttpEntity.Chunked$, HttpEntity.ChunkStreamPart, HttpEntity.ChunkStreamPart$, HttpEntity.CloseDelimited, HttpEntity.CloseDelimited$, HttpEntity.Default, HttpEntity.Default$, HttpEntity.DiscardedEntity, HttpEntity.HttpEntityScalaDSLSugar, HttpEntity.HttpEntityScalaDSLSugar$, HttpEntity.IndefiniteLength, HttpEntity.IndefiniteLength$, HttpEntity.LastChunk, HttpEntity.LastChunk$, HttpEntity.Strict, HttpEntity.Strict$, HttpEntity.WithoutKnownLength
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
contentLength()
scala.Option<java.lang.Object>
contentLengthOption()
Some(content length) if a length is defined for this entity, None otherwise.UniversalEntity
withContentType(ContentType contentType)
Creates a copy of this HttpEntity with thecontentType
overridden with the given one.UniversalEntity
withoutSizeLimit()
UniversalEntity
withSizeLimit(long maxBytes)
-
Methods inherited from interface akka.http.scaladsl.model.HttpEntity
completionStageCovariant, contentType, dataBytes, discardBytes, discardBytes, getContentLengthOption, getContentType, getDataBytes, isChunked, isCloseDelimited, isDefault, isIndefiniteLength, isKnownEmpty, isStrict, toStrict, toStrict, toStrict, toStrict, toStrict, toStrict, transformDataBytes, withContentType
-
Methods inherited from interface akka.http.scaladsl.model.RequestEntity
transformDataBytes
-
-
-
-
Method Detail
-
contentLength
long contentLength()
-
contentLengthOption
scala.Option<java.lang.Object> contentLengthOption()
Description copied from interface:HttpEntity
Some(content length) if a length is defined for this entity, None otherwise. A length is only defined for Strict and Default entity types.In many cases it's dangerous to rely on the (non-)existence of a content-length. HTTP intermediaries like (transparent) proxies are allowed to change the transfer-encoding which can result in the entity being delivered as another type as expected.
- Specified by:
contentLengthOption
in interfaceHttpEntity
- Returns:
- (undocumented)
-
withContentType
UniversalEntity withContentType(ContentType contentType)
Description copied from interface:HttpEntity
Creates a copy of this HttpEntity with thecontentType
overridden with the given one.- Specified by:
withContentType
in interfaceBodyPartEntity
- Specified by:
withContentType
in interfaceHttpEntity
- Specified by:
withContentType
in interfaceRequestEntity
- Specified by:
withContentType
in interfaceResponseEntity
- Parameters:
contentType
- (undocumented)- Returns:
- (undocumented)
-
withSizeLimit
UniversalEntity withSizeLimit(long maxBytes)
- Specified by:
withSizeLimit
in interfaceBodyPartEntity
- Specified by:
withSizeLimit
in interfaceHttpEntity
- Specified by:
withSizeLimit
in interfaceHttpEntity
- Specified by:
withSizeLimit
in interfaceRequestEntity
- Specified by:
withSizeLimit
in interfaceResponseEntity
- Parameters:
maxBytes
- (undocumented)- Returns:
- (undocumented)
-
withoutSizeLimit
UniversalEntity withoutSizeLimit()
- Specified by:
withoutSizeLimit
in interfaceBodyPartEntity
- Specified by:
withoutSizeLimit
in interfaceHttpEntity
- Specified by:
withoutSizeLimit
in interfaceHttpEntity
- Specified by:
withoutSizeLimit
in interfaceRequestEntity
- Specified by:
withoutSizeLimit
in interfaceResponseEntity
- Returns:
- (undocumented)
-
-