handles request matchers
registryinitialze registry list with a request, or leave empty
default_matchersrequest matchers to use. default: method, uri
new()Create a new RequestMatcherRegistry object
RequestMatcherRegistry$new(
registry = list(),
default_matchers = list("method", "uri")
)registryinitialze registry list with a request, or leave empty
default_matchersrequest matchers to use. default: method, uri
A new RequestMatcherRegistry object
register()Register a custom matcher
RequestMatcherRegistry$register(name, func)namematcher name
funcfunction that describes a matcher, should return a single boolean
no return; registers the matcher
register_built_ins()Register all built in matchers
RequestMatcherRegistry$register_built_ins()no return; registers all built in matchers
try_to_register_body_as_json()Try to register body as JSON
RequestMatcherRegistry$try_to_register_body_as_json(r1, r2)r1, r2Request class objects
no return; registers the matcher
clone()The objects of this class are cloneable with this method.
RequestMatcherRegistry$clone(deep = FALSE)deepWhether to make a deep clone.
if (FALSE) {
(x <- RequestMatcherRegistry$new())
x$default_matchers
x$registry
}
Run the code above in your browser using DataLab