View source: R/req_cookiemoster_set.r
| req_cookiemonster_set | R Documentation |
Adds all cookies for the domain from the jar to a httr2 request.
req_cookiemonster_set(req, jar = default_jar(), ...)
req |
A request object. |
jar |
A character string of the path to the cookie jar (the default is
to use |
... |
not currently used. |
A request object (with cookies).
library(httr2)
domain <- url_parse(example_url())$hostname
add_cookies(cookiestring = "snicker=doodle; password=secret", domain = domain)
request(example_url()) |>
req_url_path("/cookies/set") |>
req_cookiemonster_set() |>
req_perform() |>
resp_body_json()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.