X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/cd51d386dae9365305e099503e1b16a5714d84c1..4dfd99323cb556e71365ea2a14d267d8e1403ee9:/web-server.el diff --git a/web-server.el b/web-server.el index 88af45b55..ac02cdf66 100644 --- a/web-server.el +++ b/web-server.el @@ -6,6 +6,25 @@ ;; Keywords: http ;; License: GPLV3 (see the COPYING file in this directory) +;;; Commentary: + +;; A web server in Emacs running handlers written in Emacs Lisp. +;; +;; Full support for GET and POST requests including URL-encoded +;; parameters and multi-part/form data. +;; +;; See the examples/ directory for examples demonstrating the usage of +;; the Emacs Web Server. The following launches a simple "hello +;; world" server. +;; +;; (ws-start +;; '(((lambda (_) t) . ; match every request +;; (lambda (request) ; reply with "hello world" +;; (with-slots (process) request +;; (ws-response-header process 200 '("Content-type" . "text/plain")) +;; (process-send-string process "hello world"))))) +;; 9000) + ;;; Code: (require 'web-server-status-codes) (require 'mail-parse) ; to parse multipart data in headers