HTTP headers, media types, methods, relations and status codes, all summarized and linking to their specification.
This project is used by HyperREST bin at bin.hyperrest.com .
- SPECS
- HEADERS
- MEDIA TYPES
- METHODS
- RELATIONS
- STATUS CODES
(require 'know-your-http-well)
;; M-x http-headers ;; content-type
;; M-x http-method ;; post
;; M-x http-relation ;; describedby
;; M-x http-status-code ;; 500
;; M-x http-status-code ;; not_found
var httpWell = require('know-your-http-well'),
statusWell = httpWell.statusPhrasesToCodes,
phraseWell = httpWell.statusCodesToPhrases;
// on the server side
res.statusCode = statusWell.NOT_FOUND
// on the client side
if (res.statusCode !== statusWell.OK) {
// Log "Request returned 404 Not Found"
log('Request returned ' + res.statusCode + ' ' + phraseWell[res.statusCode]);
}
Just take a look at ./json/*.json.