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
-
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
Modifier and TypeMethodDescriptionlong
scala.Option<Object>
Some(content length) if a length is defined for this entity, None otherwise.withContentType
(ContentType contentType) Creates a copy of this HttpEntity with thecontentType
overridden with the given one.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 Details
-
contentLength
long contentLength() -
contentLengthOption
scala.Option<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
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
- 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)
-