Package akka.http.scaladsl.model
Interface RequestEntity
- All Superinterfaces:
HttpEntity
,HttpEntity
,RequestEntity
,ResponseEntity
,ResponseEntity
- All Known Subinterfaces:
UniversalEntity
- All Known Implementing Classes:
HttpEntity.Chunked
,HttpEntity.Default
,HttpEntity.Strict
An
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!)-
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 TypeMethodDescriptiontransformDataBytes
(akka.stream.scaladsl.Flow<akka.util.ByteString, akka.util.ByteString, Object> transformer) Returns a copy of the given entity with the ByteString chunks of this entity transformed by the given transformer.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, contentLengthOption, contentType, dataBytes, discardBytes, discardBytes, getContentLengthOption, getContentType, getDataBytes, isChunked, isCloseDelimited, isDefault, isIndefiniteLength, isKnownEmpty, isStrict, toStrict, toStrict, toStrict, toStrict, toStrict, toStrict, transformDataBytes, withContentType
-
Method Details
-
transformDataBytes
RequestEntity transformDataBytes(akka.stream.scaladsl.Flow<akka.util.ByteString, akka.util.ByteString, Object> transformer) Description copied from interface:HttpEntity
Returns a copy of the given entity with the ByteString chunks of this entity transformed by the given transformer. For aChunked
entity, the chunks will be transformed one by one keeping the chunk metadata (but may introduce an extra chunk before theLastChunk
iftransformer.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.- Specified by:
transformDataBytes
in interfaceHttpEntity
- Specified by:
transformDataBytes
in interfaceResponseEntity
- Parameters:
transformer
- (undocumented)- 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 interfaceHttpEntity
- Specified by:
withContentType
in interfaceResponseEntity
- Parameters:
contentType
- (undocumented)- Returns:
- (undocumented)
-
withSizeLimit
- Specified by:
withSizeLimit
in interfaceHttpEntity
- Specified by:
withSizeLimit
in interfaceHttpEntity
- Specified by:
withSizeLimit
in interfaceResponseEntity
- Parameters:
maxBytes
- (undocumented)- Returns:
- (undocumented)
-
withoutSizeLimit
RequestEntity withoutSizeLimit()- Specified by:
withoutSizeLimit
in interfaceHttpEntity
- Specified by:
withoutSizeLimit
in interfaceHttpEntity
- Specified by:
withoutSizeLimit
in interfaceResponseEntity
- Returns:
- (undocumented)
-