as.redactor | R Documentation |
Redactors take a httr2_response
or httr2_request
as their first argument, and some take additional
arguments: redact_headers()
, for example, requires that you specify
headers
. This function allows you to take a simplified expression via a
formula, similar to what purrr
does, so that you can provide the function
to capture_requests()
.
as.redactor(fmla)
fmla |
Partial expression (a |
For example, as.redactor(~ redact_headers(., "X-Custom-Header"))
is equivalent
to function (response) redact_headers(response, "X-Custom-Header")
. This
allows you to do
set_redactor(~ redact_headers(., "X-Custom-Header"))
.
A function
.
capture_requests()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.