November 2010
Intermediate to advanced
504 pages
12h 45m
English
To try out our shiny new web server, let’s build a simple site that greets a visitor, using the dirt-simple function hello-request-handler:
(defun hello-request-handler (path header params)(if (equal path "greeting")
(let ((name (assoc 'name params))) (format t "HTTP/1.1 200 OK~%~%") (if (not name) (princ "<html><form>What is your name?<input name='name' />
</form></html>") (format t "<html>Nice to meet you, ˜a!</html>" ...
Read now
Unlock full access