Interface UrlHandlerFilter.TrailingSlashHandlerSpec

Enclosing class:
UrlHandlerFilter

public static interface UrlHandlerFilter.TrailingSlashHandlerSpec
A spec to configure a trailing slash handler.
  • Method Details

    • intercept

      A callback to intercept requests with a trailing slash.
      Parameters:
      consumer - callback to be invoked for requests with a trailing slash
      Returns:
      the same spec instance
    • andRedirect

      UrlHandlerFilter.Builder andRedirect(HttpStatus status)
      Handle by sending a redirect with the given HTTP status and a location with the trailing slash trimmed.
      Parameters:
      status - the status to use
      Returns:
      to go back to the main UrlHandlerFilter.Builder and either add more handlers or build the Filter instance.
    • andHandleRequest

      UrlHandlerFilter.Builder andHandleRequest()
      Handle by wrapping the request with the trimmed trailing slash and delegating to the rest of the filter chain.
      Returns:
      to go back to the main UrlHandlerFilter.Builder and either add more handlers or build the Filter instance.