rontolisp:query-params
(rontolisp:query-params query)
Parses a query string such as "a=1&b=two&flag" into an alist of
(key . value) string pairs. Keys and values are url-decoded with
rontolisp:url-decode; a key without = gets the
value ""; duplicate keys are preserved in order; empty segments are
skipped. nil (a request without a query string) yields nil, so
(rontolisp:query-params (getf request :query)) is always safe inside an
rontolisp:http-handler handler.
The alist prints readably and works with assoc:
Backend support
Works on every backend and in every WASM mode (Preview 1 included): the
library is written in rontolisp itself and is compiled into the program when
used. For the common "value of one name" lookup use
rontolisp:query-param.