fast-twitch.middlewares.nested-params
Complete generated reference for fast-twitch.middlewares.nested-params
Usage and execution boundary
Transforms already-parsed bracketed names into nested maps/vectors across params, query-params, form-params and multipart-params. Run decoding first, then nesting, then keyword conversion.
(ns application.middleware
(:require [fast-twitch.middlewares.nested-params :as middleware]))
(defn handler [_]
{:status 200 :headers {"content-type" "text/plain"} :body "Hello"})
(def app (middleware/wrap-nested-params handler))
This defines the Ring handler portion. Adapt app through routing/ft-handler or pass it to server/listen!; startup instructions and a complete walkthrough show the surrounding project.
Settings and defaults
| Setting | Meaning |
|---|---|
:key-parser |
Function used instead of parse-nested-keys |
Wrapper order and all middleware families. The function reference below preserves the upstream signatures and source links; helper functions do not all share the wrapper's arity.
Upstream function reference
Turns bracketed parameter names into nested maps and vectors.
nested-params-request
(nested-params-request request)
(nested-params-request request options)
Function.
Rewrites parsed parameter maps using nested structures. Source
parse-nested-keys
(parse-nested-keys param-name)
Function.
Splits a bracketed parameter name into its path segments. Source
wrap-nested-params
(wrap-nested-params handler)
(wrap-nested-params handler options)
Function.
Wraps a handler so bracketed parameter names become nested data. Source