Skip to content

Extract the headers from a response

Usage

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)
#> $date
#> [1] "Wed, 17 Aug 2022 14:41:51 GMT"
#> 
#> $`content-type`
#> [1] "application/json"
#> 
#> $`content-length`
#> [1] "399"
#> 
#> $connection
#> [1] "keep-alive"
#> 
#> $server
#> [1] "gunicorn/19.9.0"
#> 
#> $`access-control-allow-origin`
#> [1] "*"
#> 
#> $`access-control-allow-credentials`
#> [1] "true"
#> 
#> attr(,"class")
#> [1] "insensitive" "list"