Title: | 'HTTP' Status Code Helper |
Description: | Find and explain the meaning of 'HTTP' status codes. Functions included for searching for codes by full or partial number, by message, and get appropriate dog and cat images for many status codes. |
Version: | 0.3.0 |
License: | MIT + file LICENSE |
URL: | https://github.com/sckott/httpcode |
BugReports: | https://github.com/sckott/httpcode/issues |
Encoding: | UTF-8 |
Language: | en-US |
Suggests: | testthat |
RoxygenNote: | 7.1.0 |
NeedsCompilation: | no |
Packaged: | 2020-04-10 03:18:28 UTC; sckott |
Author: | Scott Chamberlain |
Maintainer: | Scott Chamberlain <myrmecocystus@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2020-04-10 06:20:02 UTC |
httpcode
Description
Explain the meaning of HTTP status codes
Author(s)
Scott Chamberlain myrmecocystus@gmail.com
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 |
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
## 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)
Find out about http status codes
Description
Find out about http status codes
Usage
http_code(code, verbose = FALSE)
http_search(text, verbose = FALSE)
Arguments
code |
(character) An http status code, or a regex search for HTTP status codes. must be length 1. required |
verbose |
(logical) include verbose status code explanation.
Default: |
text |
(character) A text string to search the messages or descriptions of HTTP status codes. required |
Value
on S3 object of class http_code
, that is inside a list
of the form:
status_code - the status code
message - very brief message explaining the code
explanation - more verbose explanation, but still short
explanation_verbose - the complete explanation
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)
## Not run:
http_search("birds")
http_code(999)
## End(Not run)