Interface urlHandlerFilter.Builder.TrailingSlashSpec
- Enclosing interface:
urlHandlerFilter.Builder
public static interface urlHandlerFilter.Builder.TrailingSlashSpec
A spec to configure a trailing slash handler.
- Since:
- 6.2
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionintercept(Function<ServerHttpRequest, reactor.core.publisher.Mono<Void>> interceptor) Configure a request interceptor to be called just before the handler is invoked when a url with a trailing slash is matched.Handle the request by wrapping it in order to trim the trailing slash, and delegating to the rest of the filter chain.redirect(HttpStatusCode statusCode) Handle requests by sending a redirect to the same url but the trailing slash trimmed.
-
Method Details
-
intercept
urlHandlerFilter.Builder.TrailingSlashSpec intercept(Function<ServerHttpRequest, reactor.core.publisher.Mono<Void>> interceptor) Configure a request interceptor to be called just before the handler is invoked when a url with a trailing slash is matched. -
redirect
Handle requests by sending a redirect to the same url but the trailing slash trimmed.- Parameters:
statusCode- the redirect status to use- Returns:
- the top level
urlHandlerFilter.Builder, which allows adding more handlers and then building the Filter instance.
-
mutateRequest
urlHandlerFilter.Builder mutateRequest()Handle the request by wrapping it in order to trim the trailing slash, and delegating to the rest of the filter chain.- Returns:
- the top level
urlHandlerFilter.Builder, which allows adding more handlers and then building the Filter instance.
-