You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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)
The text was updated successfully, but these errors were encountered: