## Not run: ------------------------------------
# (x <- RequestPattern$new(method = "get", uri = "https://httpbin.org/get"))
# x$body_pattern
# x$headers_pattern
# x$method_pattern
# x$uri_pattern
# x$to_s()
#
# # make a request signature
# rs <- RequestSignature$new(method = "get", uri = "https://httpbin.org/get")
#
# # check if it matches
# x$matches(rs)
#
# # regex uri
# (x <- RequestPattern$new(method = "get", uri_regex = ".+ossref.org"))
# x$uri_pattern
# x$uri_pattern$to_s()
# x$to_s()
#
# # uri with query parameters
# (x <- RequestPattern$new(
# method = "get", uri = "https://httpbin.org/get",
# query = list(foo = "bar")
# ))
# x$to_s()
## ---------------------------------------------
Run the code above in your browser using DataLab