Extract the headers from a response

headers(x)

Arguments

x

A request object

See also

add_headers() to send additional headers in a request

Examples

r <- GET("http://httpbin.org/get") headers(r)
#> $`access-control-allow-credentials` #> [1] "true" #> #> $`access-control-allow-origin` #> [1] "*" #> #> $`content-encoding` #> [1] "gzip" #> #> $`content-type` #> [1] "application/json" #> #> $date #> [1] "Mon, 05 Aug 2019 15:13:06 GMT" #> #> $`referrer-policy` #> [1] "no-referrer-when-downgrade" #> #> $server #> [1] "nginx" #> #> $`x-content-type-options` #> [1] "nosniff" #> #> $`x-frame-options` #> [1] "DENY" #> #> $`x-xss-protection` #> [1] "1; mode=block" #> #> $`content-length` #> [1] "235" #> #> $connection #> [1] "keep-alive" #> #> attr(,"class") #> [1] "insensitive" "list"