Description Super classes Methods
Provide a set of utilities to test requests going through the application logic, for profiling or evaluation.
webtools::Configurable
-> webtools::Plugin
-> webtools::DispatchPlugin
-> Plugin
new()
Create a new TestPlugin
TestPlugin$new()
header()
Simulate an HTTP header request
TestPlugin$header( path = "/", url = NULL, method = "get", router = NULL, base_path = "", content = "", headers = list(), trust = TRUE, ... )
path
(str) path to be hit by the request
url
(str) URL of the request
method
(str) HTTP method
router
(str) route name
base_path
(str) root; stripped out of the path when handling requests
content
(str) content of the request
headers
(lst) list of request headers of the test request
trust
(flg) indicates whether request should be trusted
...
(arg) additional arguments to fiery::fake_request()
request()
Simulate an HTTP request
TestPlugin$request( path = "/", url = NULL, method = "get", router = NULL, base_path = "", content = "", headers = list(), trust = TRUE, ... )
path
(str) path to be hit by the request
url
(str) URL of the request
method
(str) HTTP method
router
(str) route name
base_path
(str) root; stripped out of the path when handling requests
content
(str) content of the request
headers
(lst) list of request headers of the test request
trust
(flg) indicates whether request should be trusted
...
(arg) additional arguments to fiery::fake_request()
message()
Simulate a websocket message
TestPlugin$message( message, ..., binary = FALSE, path = "/", url = NULL, method = "get", router = NULL, base_path = "", content = "", headers = list(), trust = TRUE, close = TRUE )
message
(str) message to be sent
...
(arg) extra arguments
binary
(flg) is the message a binary message?
path
(str) path to be hit by the request
url
(str) URL of the request
method
(str) HTTP method
router
(str) route name
base_path
(str) root; stripped out of the path when handling requests
content
(str) content of the request
headers
(lst) list of request headers of the test request
trust
(flg) indicates whether request should be trusted
close
(flg) if this is not a route, then close the connection?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.