public interface UniversalEntity extends UniversalEntity, RequestEntity, BodyPartEntity
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
Modifier and Type | Method and 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 the
contentType overridden with the given one. |
UniversalEntity |
withoutSizeLimit()
|
UniversalEntity |
withSizeLimit(long maxBytes)
|
transformDataBytes
completionStageCovariant, contentType, dataBytes, discardBytes, discardBytes, getContentLengthOption, getContentType, getDataBytes, isChunked, isCloseDelimited, isDefault, isIndefiniteLength, isKnownEmpty, isStrict, toStrict, toStrict, toStrict, toStrict, toStrict, toStrict, transformDataBytes, withContentType
long contentLength()
scala.Option<java.lang.Object> contentLengthOption()
HttpEntity
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.
UniversalEntity withContentType(ContentType contentType)
HttpEntity
contentType
overridden with the given one.contentType
- (undocumented)UniversalEntity withSizeLimit(long maxBytes)
withSizeLimit
in interface HttpEntity
maxBytes
- (undocumented)UniversalEntity withoutSizeLimit()
withoutSizeLimit
in interface HttpEntity