在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:for-GET/know-your-http-well开源软件地址:https://github.com/for-GET/know-your-http-well开源编程语言:Emacs Lisp 98.7%开源软件介绍:KNOW YOUR HTTP * WELLHTTP encodings, 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 . Table of ContentsHow to convert to other formatsPackagesEmacs(require 'know-your-http-well)
;; M-x http-header ;; content-type
;; M-x http-method ;; post | POST
;; M-x http-relation ;; describedby
;; M-x http-status-code ;; 500
;; M-x http-status-code ;; not_found | NOT_FOUND JavaScriptvar 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]);
} JSONJust take a look at ./json/*.json. License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论