Interface HttpRequest.Path

Enclosing interface:
HttpRequest

public static interface HttpRequest.Path
Represents requested normalised URI path.
  • Method Summary

    Modifier and Type
    Method
    Description
    If the instance represents a path relative to some context root then returns absolute requested path otherwise returns this instance.
    param(String name)
    Returns value of single parameter resolved from path pattern.
    Returns path as a list of its segments.
    Returns a path string representation with leading slash without any character decoding.
    Returns a path string representation with leading slash.
  • Method Details

    • param

      String param(String name)
      Returns value of single parameter resolved from path pattern.
      Parameters:
      name - a parameter name
      Returns:
      a parameter value or null if not exist
    • segments

      List<String> segments()
      Returns path as a list of its segments.
      Returns:
      a list of path segments
    • toString

      String toString()
      Returns a path string representation with leading slash.
      Overrides:
      toString in class Object
      Returns:
      a path
    • toRawString

      String toRawString()
      Returns a path string representation with leading slash without any character decoding.
      Returns:
      an undecoded path
    • absolute

      HttpRequest.Path absolute()
      If the instance represents a path relative to some context root then returns absolute requested path otherwise returns this instance.

      The absolute path also contains access to path parameters defined in context matchers. If there is name conflict then value represents latest matcher result.

      Returns:
      an absolute requested URI path