| RequestPattern | R Documentation |
Class handling all request matchers
method_patternxxx
uri_patternxxx
body_patternxxx
headers_patternxxx
new()Create a new RequestPattern object
RequestPattern$new( method, uri = NULL, uri_regex = NULL, query = NULL, body = NULL, headers = NULL, basic_auth = NULL )
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
A new RequestPattern object
matches()does a request signature match the selected matchers?
RequestPattern$matches(request_signature)
request_signaturea 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)
deepWhether 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.