fast-twitch.middlewares.params
Complete generated reference for fast-twitch.middlewares.params
Usage and execution boundary
Parses query strings and URL-encoded form bodies, with repeated fields represented as vectors. Request keys are query-params, form-params and merged params. Keys remain strings until keyword conversion. This does not parse JSON.
(ns application.middleware
(:require [fast-twitch.middlewares.params :as middleware]))
(defn handler [_]
{:status 200 :headers {"content-type" "text/plain"} :body "Hello"})
(def app (middleware/wrap-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 |
|---|---|
:encoding |
Accepted by the wrapper but ignored by the current parser; native URLSearchParams/text decoding is used |
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
Parses query strings and URL-encoded form bodies into request parameter maps.
assoc-form-params
(assoc-form-params request)
(assoc-form-params request _encoding)
Function.
Associates parsed URL-encoded form parameters onto the request. Source
assoc-query-params
(assoc-query-params request)
(assoc-query-params request _encoding)
Function.
Associates parsed query parameters onto the request. Source
params-request
(params-request request)
(params-request request options)
Function.
Parses query and URL-encoded form parameters for a request. Source
wrap-params
(wrap-params handler)
(wrap-params handler options)
Function.
Wraps a handler so query and form parameters are available on the request. Source