Interface ResponseEntity

    • Method Detail

      • 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)
      • transformDataBytes

        ResponseEntity transformDataBytes​(akka.stream.scaladsl.Flow<akka.util.ByteString,​akka.util.ByteString,​java.lang.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)