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 longcontentLength()scala.Option<java.lang.Object>contentLengthOption()Some(content length) if a length is defined for this entity, None otherwise.UniversalEntitywithContentType(ContentType contentType)Creates a copy of this HttpEntity with thecontentTypeoverridden with the given one.UniversalEntitywithoutSizeLimit()UniversalEntitywithSizeLimit(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:HttpEntitySome(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:
contentLengthOptionin interfaceHttpEntity- Returns:
- (undocumented)
-
withContentType
UniversalEntity withContentType(ContentType contentType)
Description copied from interface:HttpEntityCreates a copy of this HttpEntity with thecontentTypeoverridden with the given one.- Specified by:
withContentTypein interfaceBodyPartEntity- Specified by:
withContentTypein interfaceHttpEntity- Specified by:
withContentTypein interfaceRequestEntity- Specified by:
withContentTypein interfaceResponseEntity- Parameters:
contentType- (undocumented)- Returns:
- (undocumented)
-
withSizeLimit
UniversalEntity withSizeLimit(long maxBytes)
- Specified by:
withSizeLimitin interfaceBodyPartEntity- Specified by:
withSizeLimitin interfaceHttpEntity- Specified by:
withSizeLimitin interfaceHttpEntity- Specified by:
withSizeLimitin interfaceRequestEntity- Specified by:
withSizeLimitin interfaceResponseEntity- Parameters:
maxBytes- (undocumented)- Returns:
- (undocumented)
-
withoutSizeLimit
UniversalEntity withoutSizeLimit()
- Specified by:
withoutSizeLimitin interfaceBodyPartEntity- Specified by:
withoutSizeLimitin interfaceHttpEntity- Specified by:
withoutSizeLimitin interfaceHttpEntity- Specified by:
withoutSizeLimitin interfaceRequestEntity- Specified by:
withoutSizeLimitin interfaceResponseEntity- Returns:
- (undocumented)
-
-