Interface RedirectConfig.RedirectRequestTransformer

Enclosing interface:
RedirectConfig
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface RedirectConfig.RedirectRequestTransformer
Provides access to the full context of the redirect to apply transformations for the pre-initialized redirect request.

It can be used to add/remove headers, payload body, or trailers.

  • Method Details

    • apply

      StreamingHttpRequest apply(boolean relative, StreamingHttpRequest previousRequest, StreamingHttpResponse redirectResponse, StreamingHttpRequest redirectRequest)
      Applies transformations for the pre-initialized redirect request.
      Parameters:
      relative - if true, the redirect location was identified as relative to the previous request
      previousRequest - previous request that was redirected
      redirectResponse - response to redirect
      redirectRequest - pre-initialized request to follow the redirect
      Returns:
      the final StreamingHttpRequest that will be sent to follow the redirect after all transformations applied