Interface UniversalEntity
- All Superinterfaces:
- BodyPartEntity,- BodyPartEntity,- HttpEntity,- HttpEntity,- RequestEntity,- RequestEntity,- ResponseEntity,- ResponseEntity,- UniversalEntity
- All Known Implementing Classes:
- HttpEntity.Default,- HttpEntity.Strict
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.pekko.http.javadsl.model.HttpEntityHttpEntity.Chunked, HttpEntity.ChunkStreamPart, HttpEntity.CloseDelimited, HttpEntity.Default, HttpEntity.DiscardedEntity, HttpEntity.IndefiniteLength, HttpEntity.StrictNested classes/interfaces inherited from interface org.apache.pekko.http.scaladsl.model.HttpEntityHttpEntity.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 SummaryModifier and TypeMethodDescriptionlongscala.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 thecontentTypeoverridden with the given one.withSizeLimit(long maxBytes) Methods inherited from interface org.apache.pekko.http.scaladsl.model.HttpEntitycompletionStageCovariant, contentType, dataBytes, discardBytes, discardBytes, getContentLengthOption, getContentType, getDataBytes, isChunked, isCloseDelimited, isDefault, isIndefiniteLength, isKnownEmpty, isStrict, toStrict, toStrict, toStrict, toStrict, toStrict, toStrict, transformDataBytes, withContentTypeMethods inherited from interface org.apache.pekko.http.scaladsl.model.RequestEntitytransformDataBytes
- 
Method Details- 
contentLengthlong contentLength()
- 
contentLengthOptionscala.Option<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 interface- HttpEntity
- Returns:
- (undocumented)
 
- 
withContentTypeDescription copied from interface:HttpEntityCreates a copy of this HttpEntity with thecontentTypeoverridden with the given one.- Specified by:
- withContentTypein interface- BodyPartEntity
- Specified by:
- withContentTypein interface- HttpEntity
- Specified by:
- withContentTypein interface- RequestEntity
- Specified by:
- withContentTypein interface- ResponseEntity
- Parameters:
- contentType- (undocumented)
- Returns:
- (undocumented)
 
- 
withSizeLimit- Specified by:
- withSizeLimitin interface- BodyPartEntity
- Specified by:
- withSizeLimitin interface- HttpEntity
- Specified by:
- withSizeLimitin interface- HttpEntity
- Specified by:
- withSizeLimitin interface- RequestEntity
- Specified by:
- withSizeLimitin interface- ResponseEntity
- Parameters:
- maxBytes- (undocumented)
- Returns:
- (undocumented)
 
- 
withoutSizeLimitUniversalEntity withoutSizeLimit()- Specified by:
- withoutSizeLimitin interface- BodyPartEntity
- Specified by:
- withoutSizeLimitin interface- HttpEntity
- Specified by:
- withoutSizeLimitin interface- HttpEntity
- Specified by:
- withoutSizeLimitin interface- RequestEntity
- Specified by:
- withoutSizeLimitin interface- ResponseEntity
- Returns:
- (undocumented)
 
 
-