[hunchentoot-devel] parameters

Rommel Martinez ebzzry at gmail.com
Tue Feb 12 06:49:26 UTC 2008


On Feb 12, 2008 2:37 PM, Victor Kryukov <victor.kryukov at gmail.com> wrote:
> "Rommel Martinez" <ebzzry at gmail.com> writes:
>
> > Hi! How do I make an HREF link "call" a dispatch function (and "pass"
> > parameters without having to write long strings like this:
> >
> > "/?foo=1&bar=2&baz=3"
> >
> > I am able to do it with forms, using POST, but not with HREFs. :-(
>
> Hey Rommel,
>
> one way to do that is to check Dr. Weitz's very own url-rewrite[1], a
> Hunchentoot dependency, in particular ADD-GET-PARAM-TO-URL:
>
> * (add-get-param-to-url "http://common-lisp.net/" "foo" "bar")
> "http://common-lisp.net/?foo=bar"
>
> * (add-get-param-to-url "http://common-lisp.net/index.html?frob=42" "foo" "bar")
> "http://common-lisp.net/index.html?frob=42&foo=bar"
>
> * (add-get-param-to-url "http://common-lisp.net/" "foo" "+")
> "http://common-lisp.net/?foo=%2B"
>
> Regards,
> Victor.
>
> [1] http://www.weitz.de/url-rewrite/#add-get-param-to-url
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>

Sweet! Thanks! :-)

-- 
Rommel M. Martinez <ebzzry at gmail.com>



More information about the Tbnl-devel mailing list