Explains the meaning of an HTTP status code in minibuffer
- Emacs Lisp 100%
| httpcode.el | use a separate variable for the custom HTTP codes | |
| LICENSE | Create LICENSE | |
| README.rst | use a separate variable for the custom HTTP codes | |
_ _ _____ _____ ____ ____ ___ ____ _____ _____ _
| | | |_ _|_ _| _ \ / ___/ _ \| _ \| ____| | ____| |
| |_| | | | | | | |_) | | | | | | | | | _| | _| | |
| _ | | | | | | __/| |__| |_| | |_| | |___ _| |___| |___
|_| |_| |_| |_| |_| \____\___/|____/|_____(_)_____|_____|
httpcode.el provides a simple command hc that explains the meaning of an HTTP status code in minibuffer.
Installation
Copy httpcode.el to your load-path and add to your .emacs:
(require 'httpcode)
Alternately use Marmalade:
M-x package-install httpcode
Then run the command with M-x hc
To add custom HTTP codes, like the ones used by Cloudflare:
(setq custom-http-codes
'((522 ("Connection timed out" "Error 522 occurs when Cloudflare times out contacting the origin web server."))
(523 ("Origin is unreachable" "Error 523 occurs when Cloudflare cannot contact your origin web server."))))
Usage
M-x hc RET Enter HTTP code: 418 RET
Status code 418
Message: I'm a teapot
Code explanation: The HTCPCP server is a teapot