An extractor that extracts from a String using a PathBindable.
Extractors that bind types from paths using PathBindable.
String interpolator for extracting parameters out of URL paths.
String interpolator for extracting parameters out of URL paths.
By default, any sub value extracted out by the interpolator will match a path segment, that is, any String not containing a /, and its value will be decoded. If however the sub value is suffixed with *, then it will match any part of a path, and not be decoded. Regular expressions are also supported, by suffixing the sub value with a regular expression in angled brackets, and these are not decoded.
The path extractor.
The path extractor.
Supported data types that can be extracted from:
An extractor that extracts requests by method.
Extractors that extract requests by method.
Extracts a DELETE request.
Extracts a DELETE request.
Extracts a GET request.
Extracts a GET request.
Extracts a HEAD request.
Extracts a HEAD request.
Extracts an OPTIONS request.
Extracts an OPTIONS request.
Extracts a PATCH request.
Extracts a PATCH request.
Extracts a POST request.
Extracts a POST request.
Extracts a PUT request.
Extracts a PUT request.
A boolean extractor.
A boolean extractor.
A double extractor.
A double extractor.
A float extractor.
A float extractor.
An int extractor.
An int extractor.
A long extractor.
A long extractor.
The Play "String Interpolating Routing DSL", sird for short.
This provides: - Extractors for requests that extract requests by method, eg GET, POST etc. - A string interpolating path extractor - Extractors for binding parameters from paths to various types, eg int, long, double, bool.
The request method extractors return the original request for further extraction.
The path extractor supports three kinds of extracted values: - Path segment values. This is the default, eg
p"/foo/$id"
. The value will be URI decoded, and may not traverse /'s. - Full path values. This can be indicated by post fixing the value with a *, egp"/assets/$path*"
. The value will not be URI decoded, as that will make it impossible to distinguish between / and %2F. - Regex values. This can be indicated by post fixing the value with a regular expression enclosed in angle brackets. For example,p"/foo/$id<[0-9]+>
. The value will not be URI decoded.The extractors for primitive types are merely provided for convenience, for example,
p"/foo/${int(id)}"
will extractid
as an integer. Ifid
is not an integer, the match will simply fail.Example usage: