View source: R/spq_control_request.R
spq_control_request | R Documentation |
spq_init()
Create the request control object for spq_init()
spq_control_request(
user_agent = getOption("glitter.ua",
"glitter R package (https://github.com/lvaudor/glitter)"),
max_tries = getOption("glitter.max_tries", 3L),
max_seconds = getOption("glitter.max_seconds", 120L),
timeout = getOption("glitter.timeout", 1000L),
request_type = c("url", "body-form"),
rate = NULL,
realm = NULL
)
user_agent |
a string indicating the user agent to send with the query. |
max_tries, max_seconds |
Cap the maximal number of
attemps with |
timeout |
maximum number of seconds to wait ( |
request_type |
a string indicating how the query should be sent: in the
URL ( |
rate |
Maximum rate, i.e. maximum number of requests per second.
Usually easiest expressed as a fraction,
|
realm |
An unique identifier that for throttle pool. If not supplied, defaults to the hostname of the request. |
A list to be used in spq_init()
's request_control
argument.
# Defaults
spq_control_request()
# Tweaking values
spq_control_request(
user_agent = "Jane Doe https://example.com",
max_tries = 1L,
max_seconds = 10L,
timeout = 10L,
request_type = "url"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.