File: cat_for_status.Rd

package info (click to toggle)
r-cran-httpcode 0.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 164 kB
  • sloc: makefile: 2
file content (44 lines) | stat: -rw-r--r-- 965 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cat_for_status.R
\name{cat_for_status}
\alias{cat_for_status}
\alias{dog_for_status}
\title{Use cat or dog pictures for various HTTP status codes}
\usage{
cat_for_status(code, browse = FALSE)

dog_for_status(code, browse = FALSE)
}
\arguments{
\item{code}{An http status code}

\item{browse}{(logical) If \code{TRUE}, opens image in default browser. If
\code{FALSE}, returns the URL of the image.}
}
\value{
Opens image in your default browser, or returns URL
}
\description{
Use cat or dog pictures for various HTTP status codes
}
\details{
uses a service for cats (https://http.cat) and
dogs (https://httpstatusdogs.com)
}
\examples{
\dontrun{
# 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)
}
}