-
Notifications
You must be signed in to change notification settings - Fork 79
Description
Noir is a fantastic packaging of functionality, but several of us prefer to program in a more functional, less 'bindings' way. Middleware wrappers allow us to add system-level state to ring requests, but a dynamic binding is the only way to extract and use that request object. My own solution has been to write a wrapper which destructures the request object and other state added by middleware which gets annoying.
This is a long way of asking whether we can add a special parameter to get the full request object in the defpage destructuring argument, or add a request variable to the defpage macro call so we can refer to it explicitly?
(defpage [:post "/api/foo/bar"] {:keys [userid param2 +request+]} & body)
or optional defpage form
(defpage [:post "/api/foo/bar'] request {:keys [userid param2]} & body)