]> code.delx.au - gnu-emacs-elpa/blobdiff - web-server.el
update link in README
[gnu-emacs-elpa] / web-server.el
index 88af45b55982928b9733210ab48ac32f8d87931d..ac02cdf668d6e4d447b1f4e0660770106f8518bf 100644 (file)
@@ -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