This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Hi! Can you please help me to understand how I can use io.pedestal.http.ring-middlewares/nested-params
instead of reitit.http.interceptors.parameters/parameters-interceptor
? Because I need to use something like the following query params ?status[foo]=red&status[bar]=green
I tried to rewrite this interceptor https://github.com/metosin/reitit/blob/master/modules/reitit-interceptors/src/reitit/http/interceptors/parameters.clj
(defn parameters-interceptor []
{:name ::parameters
:enter (fn [ctx]
(let [request (:request ctx)]
(assoc ctx :request (ring.middleware.nested-params/nested-params-request request))))})
and it works, but this interceptor create params
request field instead of query-params
field which reitit.http.coercion/coerce-request-interceptor
uses@y.khmelevskii you can do (update request :query-params ring.middleware.nested-params/parse-nested-keys)
@kommen looks good to me, I think most of the core team are on vacation, but PR still most welcome!
@ikitommi yeah, it would be great to add this option