-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
First of all, thanks for this package!
I wonder if it is possible to have a function to control curl handle options? I noticed that req_perform function will eventually set the handle options using the req$options but there are only several items can be modified by the existing functions (useragent, proxy, etc). If, for example, I want to set the maxage_conn option, I have to do:
req <- request("https://example.com") %>%
req_proxy("127.0.0.1", 1234) %>%
req_user_agent("something here")
req$options$maxage_conn <- 10
I was thinking if it is better to have a similar httr2-style function, say req_curl_options = function(.req, ...), to directly modify the content of the request options? Thus, the request can be chained in the usual way:
req <- request("https://example.com") %>%
req_proxy("127.0.0.1", 1234) %>%
req_user_agent("something here") %>%
req_curl_options(maxage_conn = 10) # not implemented, just concept
Metadata
Metadata
Assignees
Labels
No labels