fast-twitch.middlewares.keyword-params
Complete generated reference for fast-twitch.middlewares.keyword-params
Usage and execution boundary
Keywordizes parsed parameter maps recursively, preserving values/vectors. It does not decode a body or coerce field values to numbers/Booleans. The current options parameter does not add an alternative coercion schema.
(ns application.middleware
(:require [fast-twitch.middlewares.keyword-params :as middleware]))
(defn handler [_]
{:status 200 :headers {"content-type" "text/plain"} :body "Hello"})
(def app (middleware/wrap-keyword-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.
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
Converts string parameter keys into keywords throughout parsed parameter maps.
keyword-params-request
(keyword-params-request request)
(keyword-params-request request _options)
Function.
Keywordizes parameter maps already associated with the request. Source
wrap-keyword-params
(wrap-keyword-params handler)
(wrap-keyword-params handler options)
Function.
Wraps a handler so parsed parameters use keyword keys. Source