Override the default RCurl user agent of NULL

user_agent(agent)

Arguments

agent

string giving user agent

See also

Examples

GET("http://httpbin.org/user-agent")
#> Response [http://httpbin.org/user-agent] #> Date: 2018-12-17 20:45 #> Status: 200 #> Content-Type: application/json #> Size: 64 B #> { #> "user-agent": "libcurl/7.43.0 r-curl/3.2 httr/1.4.0.9000" #> }
GET("http://httpbin.org/user-agent", user_agent("httr"))
#> Response [http://httpbin.org/user-agent] #> Date: 2018-12-17 20:45 #> Status: 200 #> Content-Type: application/json #> Size: 27 B #> { #> "user-agent": "httr" #> }