cat_for_status: Use cat or dog pictures for various HTTP status codes

Description Usage Arguments Details Value Examples

View source: R/cat_for_status.R

Description

Use cat or dog pictures for various HTTP status codes

Usage

1
2
3
cat_for_status(code, browse = FALSE)

dog_for_status(code, browse = FALSE)

Arguments

code

An http status code

browse

(logical) If TRUE, opens image in default browser. If FALSE, returns the URL of the image.

Details

uses a service for cats (https://http.cat) and dogs (https://httpstatusdogs.com)

Value

Opens image in your default browser, or returns URL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# give back url
cat_for_status(100)
dog_for_status(100)
cat_for_status(301)
dog_for_status(301)
cat_for_status(400)
dog_for_status(400)

# open image in default browser
cat_for_status(400, browse=TRUE)

# not found
# cat_for_status(555)

## End(Not run)

Example output

[1] "https://http.cat/100"
[1] "https://httpstatusdogs.com/wp-content/uploads/100.jpg"
[1] "https://http.cat/301"
[1] "https://httpstatusdogs.com/wp-content/uploads/301.jpg"
[1] "https://http.cat/400"
[1] "https://httpstatusdogs.com/wp-content/uploads/400.jpg"

httpcode documentation built on April 14, 2020, 6:20 p.m.