1
0
Fork
You've already forked httpcode.el
0
Explains the meaning of an HTTP status code in minibuffer
  • Emacs Lisp 100%
Find a file
2020年03月04日 11:29:59 +00:00
httpcode.el use a separate variable for the custom HTTP codes 2020年03月04日 11:15:26 +00:00
LICENSE Create LICENSE 2020年03月04日 11:29:59 +00:00
README.rst use a separate variable for the custom HTTP codes 2020年03月04日 11:15:26 +00:00

_ _ _____ _____ ____ ____ ___ ____ _____ _____ _
| | | |_ _|_ _| _ \ / ___/ _ \| _ \| ____| | ____| |
| |_| | | | | | | |_) | | | | | | | | | _| | _| | |
| _ | | | | | | __/| |__| |_| | |_| | |___ _| |___| |___
|_| |_| |_| |_| |_| \____\___/|____/|_____(_)_____|_____|

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

Command line alternative

http://github.com/rspivak/httpcode