Learn R Programming

httpcode (version 0.3.0)

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

Description

Use cat or dog pictures for various HTTP status codes

Usage

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.

Value

Opens image in your default browser, or returns URL

Details

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

Examples

Run this code
# 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)
# }

Run the code above in your browser using DataLab