[spootnik/aleph-params "0.1.0"]
For Netty-based HTTP servers (for instance: aleph), provides query string parameter parsing with no additional dependencies.
Further docs on https://cljdoc.org/d/spootnik/aleph-params/CURRENT
Wrapped requests will have get-params at the :get-params
key when applicable.
(require '[aleph.http.params :refer [wrap-params]])
(def handler
(-> (constantly {:status 200 :body ""})
(wrap-params)))
An interceptor is provided at aleph.http.params/interceptor
, it provides
a single :enter
key and expects the request at the :request
key in the
context. Parameters are added at the :get-params
key for downstream
interceptors.
(require '[aleph.http.params :refer [parse-params]])
(parse-params "?foo=bar") ;; => {:foo "bar"}
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close