Package io.quarkus.rest.client.reactive
Annotation Interface ClientRedirectHandler
Used to easily define a custom redirect handler for the specific REST Client on which it's used.
This method is called when the HTTP response from the invoked service has a status code of 300 or higher.
The annotation MUST be placed on a method of the REST Client interface that meets the following criteria:
- Is a
static
method - Returns any subclass of
URI
- Takes a single parameter of type
Response
@ClientRedirectHandler
static DummyException map(Response response) {
if (response.getStatus() == 307) {
return response.getLocation();
}
// no redirect
return null;
}
If null
is returned, Quarkus will not redirect
RedirectHandler
.-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionint
The priority with which the redirect handler will be executed
-
Element Details
-
priority
int priorityThe priority with which the redirect handler will be executed- Default:
- 5000
-