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
An HttpEntity that 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, since HttpEntity.CloseDelimited can only be used for responses!)
  • Method Details

    • withContentType

      ResponseEntity withContentType(ContentType contentType)
      Description copied from interface: HttpEntity
      Creates a copy of this HttpEntity with the contentType overridden with the given one.
      Specified by:
      withContentType in interface HttpEntity
      Parameters:
      contentType - (undocumented)
      Returns:
      (undocumented)
    • withSizeLimit

      ResponseEntity withSizeLimit(long maxBytes)
      Specified by:
      withSizeLimit in interface HttpEntity
      Specified by:
      withSizeLimit in interface HttpEntity
      Parameters:
      maxBytes - (undocumented)
      Returns:
      (undocumented)
    • withoutSizeLimit

      ResponseEntity withoutSizeLimit()
      Specified by:
      withoutSizeLimit in interface HttpEntity
      Specified by:
      withoutSizeLimit in interface HttpEntity
      Returns:
      (undocumented)
    • transformDataBytes

      ResponseEntity 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 a 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.

      Specified by:
      transformDataBytes in interface HttpEntity
      Parameters:
      transformer - (undocumented)
      Returns:
      (undocumented)