Interface StreamedResponse

    • Method Detail

      • forwardTo

        void forwardTo​(Response response,
                       Action<? super MutableHeaders> headerMutator)
        Stream this received response out to the given server response.

        The HTTP status and response headers of this response will be copied to the given server response. If this response has a content-length http header it will be excluded from the copy as all responses will be streamed with a transfer-encoding of chunked. Outgoing response headers can be added and modified with the given header mutating Action.

        This method will stream the response content chunks unmodified to the given server response using the publisher returned from getBody().

        response - the server response to stream to
        headerMutator - an action that will act on the outgoing response headers