add_headers(a = 1, b = 2)
add_headers(.headers = c(a = "1", b = "2"))
if (FALSE) {
GET("http://httpbin.org/headers")
# Add arbitrary headers
GET(
"http://httpbin.org/headers",
add_headers(version = version$version.string)
)
# Override default headers with empty strings
GET("http://httpbin.org/headers", add_headers(Accept = ""))
}
Run the code above in your browser using DataLab