public interface RequestEntity extends HttpEntity, RequestEntity, ResponseEntity
HttpEntity
that can be used for requests.
Note that all entities that can be used for requests can also be used for responses.
(But not the other way around, since HttpEntity.CloseDelimited
can only be used for responses!)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 |
---|---|
RequestEntity |
transformDataBytes(org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,org.apache.pekko.util.ByteString,java.lang.Object> transformer)
Returns a copy of the given entity with the ByteString chunks of this entity transformed by the given transformer.
|
RequestEntity |
withContentType(ContentType contentType)
Creates a copy of this HttpEntity with the
contentType overridden with the given one. |
RequestEntity |
withoutSizeLimit()
|
RequestEntity |
withSizeLimit(long maxBytes)
|
completionStageCovariant, contentLengthOption, contentType, dataBytes, discardBytes, discardBytes, getContentLengthOption, getContentType, getDataBytes, isChunked, isCloseDelimited, isDefault, isIndefiniteLength, isKnownEmpty, isStrict, toStrict, toStrict, toStrict, toStrict, toStrict, toStrict, transformDataBytes, withContentType
RequestEntity transformDataBytes(org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,org.apache.pekko.util.ByteString,java.lang.Object> transformer)
HttpEntity
Chunked
entity, the chunks will be transformed one by one keeping the chunk metadata (but may introduce an
extra chunk before the LastChunk
if transformer.onTermination
returns additional data).
This method may only throw an exception if the transformer
function throws an exception while creating the transformer.
Any other errors are reported through the new entity data stream.
transformer
- (undocumented)RequestEntity withContentType(ContentType contentType)
HttpEntity
contentType
overridden with the given one.contentType
- (undocumented)RequestEntity withSizeLimit(long maxBytes)
withSizeLimit
in interface HttpEntity
maxBytes
- (undocumented)RequestEntity withoutSizeLimit()
withoutSizeLimit
in interface HttpEntity