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 org.apache.pekko.http.javadsl.model.HttpEntity
HttpEntity.Chunked, HttpEntity.ChunkStreamPart, HttpEntity.CloseDelimited, HttpEntity.Default, HttpEntity.DiscardedEntity, HttpEntity.IndefiniteLength, HttpEntity.StrictNested classes/interfaces inherited from interface org.apache.pekko.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 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.HttpEntity
completionStageCovariant, 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.RequestEntity
transformDataBytes
-
Method Details
-
contentLength
long contentLength() -
contentLengthOption
scala.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 interfaceHttpEntity- Returns:
- (undocumented)
-
withContentType
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
- 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)
-