uri_regex
requireduri
requiredwith(query, body, headers)
to_return(status, body, headers)
to_s()
stub_request()
## Not run: ------------------------------------
# x <- StubbedRequest$new(method = "get", uri = "api.crossref.org")
# x$method
# x$uri
# x$with(headers = list('User-Agent' = 'R'))
# x$to_return(status = 200, body = "foobar", headers = list(a = 5))
# x
# x$to_s()
#
# # uri_regex
# (x <- StubbedRequest$new(method = "get", uri_regex = ".+ossref.org"))
# x$method
# x$uri
# x$to_s()
## ---------------------------------------------
Run the code above in your browser using DataLab