-
- Enclosing interface:
- HttpRequest
public static interface HttpRequest.Path
Represents requested normalised URI path.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HttpRequest.Path
absolute()
If the instance represents a path relative to some context root then returns absolute requested path otherwise returns this instance.String
param(String name)
Returns value of single parameter resolved from path pattern.List<String>
segments()
Returns path as a list of its segments.String
toRawString()
Returns a path string representation with leading slash without any character decoding.String
toString()
Returns a path string representation with leading slash.
-
-
-
Method Detail
-
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.
-
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
-
-