stubbed request class underlying stub_request()
Public fields
method(xx) xx
uri(xx) xx
uri_regex(xx) xx
regexa logical
uri_parts(xx) xx
host(xx) xx
query(xx) xx
body(xx) xx
basic_auth(xx) xx
request_headers(xx) xx
response_headers(xx) xx
responses_sequences(xx) xx
status_code(xx) xx
countera StubCounter object
Methods
Method new()
Create a new StubbedRequest object
Usage
StubbedRequest$new(method, uri = NULL, uri_regex = NULL)Arguments
methodthe HTTP method (any, head, get, post, put, patch, or delete). "any" matches any HTTP method. required.
uri(character) request URI. either this or
uri_regexrequired. webmockr can match uri's without the "http" scheme, but does not match if the scheme is "https". required, unlessuri_regexgiven. See UriPattern for more.uri_regex(character) request URI as regex. either this or
urirequired
Method print()
print method for the StubbedRequest class
Method with()
Set expectations for what's given in HTTP request
Method to_return()
Set expectations for what's returned in HTTP response
Method to_timeout()
Response should time out
Method to_raise()
Response should raise an exception x
