Class RequestExpressionObject

java.lang.Object
io.micronaut.views.thymeleaf.webexpression.RequestExpressionObject

@Internal public final class RequestExpressionObject extends Object
Micronaut-native request expression object exposed to Thymeleaf as #request.
Since:
6.1.0
Author:
Sergio del Amo
  • Method Details

    • getContextPath

      public String getContextPath()
      Returns:
      the configured server context path, or an empty string when no context path is configured.
    • getMethod

      public String getMethod()
      Returns:
      the HTTP method name.
    • getPath

      public String getPath()
      Returns:
      the Micronaut request path.
    • getRequestURI

      public String getRequestURI()
      Returns:
      the request URI path without the query string.
    • getRequestURL

      public String getRequestURL()
      Returns:
      the request URL when available, or Micronaut's relative URI path when the server request has no absolute URL.
    • getQueryString

      public @Nullable String getQueryString()
      Returns:
      the raw query string, or null if the request URI does not contain one.