Override the default RCurl user agent of NULL

user_agent(agent)

Arguments

agent

string giving user agent

See also

Other config: add_headers, authenticate, config, set_cookies, timeout, use_proxy, verbose

Examples

GET("http://httpbin.org/user-agent")
#> Response [http://httpbin.org/user-agent] #> Date: 2017-08-16 14:13 #> Status: 200 #> Content-Type: application/json #> Size: 61 B #> { #> "user-agent": "libcurl/7.54.0 r-curl/2.8.1 httr/1.3.0" #> }
GET("http://httpbin.org/user-agent", user_agent("httr"))
#> Response [http://httpbin.org/user-agent] #> Date: 2017-08-16 14:13 #> Status: 200 #> Content-Type: application/json #> Size: 27 B #> { #> "user-agent": "httr" #> }