File: http.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 (67 lines) | stat: -rw-r--r-- 1,547 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/code.R
\name{http}
\alias{http}
\alias{http_code}
\alias{http_search}
\title{Find out about http status codes}
\usage{
http_code(code, verbose = FALSE)

http_search(text, verbose = FALSE)
}
\arguments{
\item{code}{(character) An http status code, or a regex search for HTTP
status codes. must be length 1. required}

\item{verbose}{(logical) include verbose status code explanation.
Default: \code{FALSE}}

\item{text}{(character) A text string to search the messages or descriptions
of HTTP status codes. required}
}
\value{
on S3 object of class \code{http_code}, that is inside a list
of the form:
\itemize{
\item status_code - the status code
\item message - very brief message explaining the code
\item explanation - more verbose explanation, but still short
\item explanation_verbose - the complete explanation
}
}
\description{
Find out about http status codes
}
\examples{
# search by code
http_code(100)
http_code(400)
http_code(503)
## verbose explanation
http_code(100, verbose = TRUE)
http_code(400, verbose = TRUE)
http_code(503, verbose = TRUE)

# fuzzy code search
http_code('1xx')
http_code('3xx')
http_code('30[12]')
http_code('30[34]')
http_code('30[34]')
## verbose explanation
http_code('1xx', verbose = TRUE)
http_code('3xx', verbose = TRUE)

# search by text message
http_search("request")
http_search("forbidden")
http_search("too")
## verbose explanation
http_search("request", verbose = TRUE)

\dontrun{
http_search("birds")
http_code(999)
}
}