RequestPattern | R Documentation |
Class handling all request matchers
method_pattern
xxx
uri_pattern
xxx
body_pattern
xxx
headers_pattern
xxx
new()
Create a new RequestPattern
object
RequestPattern$new( method, uri = NULL, uri_regex = NULL, query = NULL, body = NULL, headers = NULL, basic_auth = NULL )
method
the 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
A new RequestPattern
object
matches()
does a request signature match the selected matchers?
RequestPattern$matches(request_signature)
request_signature
a RequestSignature object
a boolean
to_s()
Print pattern for easy human consumption
RequestPattern$to_s()
a string
clone()
The objects of this class are cloneable with this method.
RequestPattern$clone(deep = FALSE)
deep
Whether to make a deep clone.
pattern classes for HTTP method MethodPattern, headers HeadersPattern, body BodyPattern, and URI/URL UriPattern
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.