Added with-query-args' as the equivalent of with-form-data' for

query url requests.  This is probably a stop-gap measure, until a more
general context processing framework (including session and validation
data) has been designed and implemented.
This commit is contained in:
2001-02-08 18:57:55 +00:00
parent e265243a53
commit 8160dc61cf
2 changed files with 14 additions and 0 deletions

View File

@ -85,6 +85,19 @@
(let ,bindings
,@body)))))
(defmacro with-query-args (vars request &body body)
(loop with data-sym = (gensym)
for var in vars
collect
`(,var (cdr (assoc (symbol-name ',var) ,data-sym
:test #'string-equal)))
into bindings
finally
(return
`(let ((,data-sym (url-query-arguments (request-url ,request))))
(let ,bindings
,@body)))))
;;; Some further utility resources
;;; Redirection

View File

@ -202,6 +202,7 @@
#:dynamic-form-resource-processor
#:parse-form-data
#:with-form-data
#:with-query-args
#:redirector-resource
#:redirector-resource-code
#:redirector-resource-destination