[Prev][Next][Index][Thread]
Re: Forms & Get.
>help?
>
>The doc says that forms which submit via GET are old fashion, but as I like how
>easy they are to bookmark - I guess - I should enjoy them while they are still
>so popular.
>
>The documentation of export-url seems to be saying that if I use GET then my
>only choice is to reply from a pathname.
>
>By the way I'm really enjoying CL-HTTP - it's great fun to work with a Common
>Lisp program that uses the whole language. It needs a hairy macrolet to which
>creates very complex micro language for a small lexical scope just to cover all
>the bases.
>
> - ben
(export-url #U"/quest?"
:search
:response-function #'create-response
:expiration '(:interval 1.)
:documentation "Response to a GET")
(defmethod create-response (url &optional (stream *so*))
(let* ((*output-stream* stream)
(url-keys (url:search-keys url))
(first-option (first url-keys)))
(declare (special *output-stream*))
(write-response-html first-option)))
Is this what you need?
Volker
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Volker C. Schöch - University of Trier (FB I), Universitätsring 15,
D-54286 Trier
schoch@uni-trier.de
http://cogpsy.uni-trier.de:8000/people/VSchoech/