Examples for 'httr::http_status'


Give information on the status of a request.

Aliases: http_status

Keywords:

### ** Examples

http_status(100)
$category
[1] "Information"

$reason
[1] "Continue"

$message
[1] "Information: (100) Continue"
http_status(404)
$category
[1] "Client error"

$reason
[1] "Not Found"

$message
[1] "Client error: (404) Not Found"
## Not run: 
##D x <- GET("http://httpbin.org/status/200")
##D http_status(x)
##D 
##D http_status(GET("http://httpbin.org/status/300"))
##D http_status(GET("http://httpbin.org/status/301"))
##D http_status(GET("http://httpbin.org/status/404"))
##D 
##D # errors out on unknown status
##D http_status(GET("http://httpbin.org/status/320"))
## End(Not run)

[Package httr version 1.4.7 Index]