MethodPattern | R Documentation |
method matcher
Matches regardless of case. e.g., POST will match to post
pattern
(character) an http method
new()
Create a new MethodPattern
object
MethodPattern$new(pattern)
pattern
(character) a HTTP method, lowercase
A new MethodPattern
object
matches()
test if the pattern matches a given http method
MethodPattern$matches(method)
method
(character) a HTTP method, lowercase
a boolean
to_s()
Print pattern for easy human consumption
MethodPattern$to_s()
a string
clone()
The objects of this class are cloneable with this method.
MethodPattern$clone(deep = FALSE)
deep
Whether to make a deep clone.
(x <- MethodPattern$new(pattern = "post"))
x$pattern
x$matches(method = "post")
x$matches(method = "POST")
# all matches() calls should be TRUE
(x <- MethodPattern$new(pattern = "any"))
x$pattern
x$matches(method = "post")
x$matches(method = "GET")
x$matches(method = "HEAD")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.