Package io.servicetalk.http.api
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.
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 Summary
Modifier and TypeMethodDescriptionapply
(boolean relative, StreamingHttpRequest previousRequest, StreamingHttpResponse redirectResponse, StreamingHttpRequest redirectRequest) Applies transformations for the pre-initialized redirect request.
-
Method Details
-
apply
StreamingHttpRequest apply(boolean relative, StreamingHttpRequest previousRequest, StreamingHttpResponse redirectResponse, StreamingHttpRequest redirectRequest) Applies transformations for the pre-initialized redirect request.- Parameters:
relative
- iftrue
, the redirect location was identified as relative to the previous requestpreviousRequest
- previous request that was redirectedredirectResponse
- response to redirectredirectRequest
- pre-initialized request to follow the redirect- Returns:
- the final
StreamingHttpRequest
that will be sent to follow the redirect after all transformations applied
-