Package akka.http.scaladsl.model
Interface ResponseEntity
-
- All Superinterfaces:
HttpEntity,HttpEntity,ResponseEntity
- All Known Subinterfaces:
RequestEntity,UniversalEntity
- All Known Implementing Classes:
HttpEntity.Chunked,HttpEntity.CloseDelimited,HttpEntity.Default,HttpEntity.Strict
public interface ResponseEntity extends HttpEntity, ResponseEntity
AnHttpEntitythat can be used for responses. Note that all entities that can be used for requests can also be used for responses. (But not the other way around, sinceHttpEntity.CloseDelimitedcan 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResponseEntitytransformDataBytes(akka.stream.scaladsl.Flow<akka.util.ByteString,akka.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.ResponseEntitywithContentType(ContentType contentType)Creates a copy of this HttpEntity with thecontentTypeoverridden with the given one.ResponseEntitywithoutSizeLimit()ResponseEntitywithSizeLimit(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 Detail
-
withContentType
ResponseEntity withContentType(ContentType contentType)
Description copied from interface:HttpEntityCreates a copy of this HttpEntity with thecontentTypeoverridden with the given one.- Specified by:
withContentTypein interfaceHttpEntity- Parameters:
contentType- (undocumented)- Returns:
- (undocumented)
-
withSizeLimit
ResponseEntity withSizeLimit(long maxBytes)
- Specified by:
withSizeLimitin interfaceHttpEntity- Specified by:
withSizeLimitin interfaceHttpEntity- Parameters:
maxBytes- (undocumented)- Returns:
- (undocumented)
-
withoutSizeLimit
ResponseEntity withoutSizeLimit()
- Specified by:
withoutSizeLimitin interfaceHttpEntity- Specified by:
withoutSizeLimitin interfaceHttpEntity- Returns:
- (undocumented)
-
transformDataBytes
ResponseEntity transformDataBytes(akka.stream.scaladsl.Flow<akka.util.ByteString,akka.util.ByteString,java.lang.Object> transformer)
Description copied from interface:HttpEntityReturns a copy of the given entity with the ByteString chunks of this entity transformed by the given transformer. For aChunkedentity, the chunks will be transformed one by one keeping the chunk metadata (but may introduce an extra chunk before theLastChunkiftransformer.onTerminationreturns additional data).This method may only throw an exception if the
transformerfunction throws an exception while creating the transformer. Any other errors are reported through the new entity data stream.- Specified by:
transformDataBytesin interfaceHttpEntity- Parameters:
transformer- (undocumented)- Returns:
- (undocumented)
-
-