Methods
Method new()
Create a new UriPattern
object
Usage
UriPattern$new(pattern = NULL, regex_pattern = NULL)
Arguments
pattern
(character) a uri, as a character string. if scheme
is missing, it is added (we assume http)
regex_pattern
(character) a uri as a regex character string,
see base::regex. if scheme is missing, it is added (we assume
http)
Returns
A new UriPattern
object
Match a uri against a pattern
Method pattern_matches()
Match a URI
Usage
UriPattern$pattern_matches(uri)
Method query_params_matches()
Match query parameters of a URI
Usage
UriPattern$query_params_matches(uri)
Extract query parameters as a named list
Usage
UriPattern$extract_query(uri)
Returns
named list, or NULL
if no query parameters
Method add_query_params()
Add query parameters to the URI
Usage
UriPattern$add_query_params(query_params)
Arguments
query_params
(list|character) list or character
Returns
nothing returned, updates uri pattern
Method to_s()
Print pattern for easy human consumption
Method clone()
The objects of this class are cloneable with this method.
Usage
UriPattern$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.