Class handling all request matchers
See also
pattern classes for HTTP method MethodPattern, headers HeadersPattern, body BodyPattern, and URI/URL UriPattern
Methods
Method new()
Create a new RequestPattern object
Usage
RequestPattern$new(
method,
uri = NULL,
uri_regex = NULL,
query = NULL,
body = NULL,
headers = NULL,
basic_auth = NULL
)Arguments
methodthe HTTP method (any, head, options, get, post, put, patch, trace, or delete). "any" matches any HTTP method. required.
uri(character) request URI. required or uri_regex
uri_regex(character) request URI as regex. required or uri
query(list) query parameters, optional
body(list) body request, optional
headers(list) headers, optional
basic_auth(list) vector of length 2 (username, password), optional
Method matches()
does a request signature match the selected matchers?
Arguments
request_signaturea RequestSignature object
