[hunchentoot-devel] parameterp?

Erik Nomitch enomitch at gmail.com
Tue Dec 30 21:02:52 UTC 2008


Hi,

I was wondering if there is a better way to test of a get/post parameter is
set.  In the documentation, it says: *(or NIL if there ain't no parameter
with this name)* .  But when it's not set and I do
(hunchentoot:get-parameter "foo") and it DNE, I get a server error.  I'm
using Hunchentoot 0.15.7 (SBCL 1.0.22).  Here is what I'm currently doing:
*
(defun parameterp (str)
  (dolist (x (hunchentoot:get-parameters))
    (when (string= (car x) str)
      (return-from parameterp t)))
  nil)*

Thanks,
Erik Nomitch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/tbnl-devel/attachments/20081230/ca5142b6/attachment.html>


More information about the Tbnl-devel mailing list