-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Milestone
Description
The concept of an Adapter is outlined here:
{:request
(fn [request context]
"Return a possibly transformed request.")
:response
(fn [response context]
"Return a possibly transformed response.")}It should be possible to attach any number of adapters to a server, allowing general processing to happen to all requests and all responses. It should also be possible to state dependencies for adapters, as you often want control over the order in which they happen. A pleasing solution would be a simple dependency system along these lines:
(defadapter my-adapter-name
{:request
(fn [request context]
"Return a possibly transformed request."),
:response
(fn [response context]
"Return a possibly transformed response."),
:run-before far-future-caching,
:run-after session-setup})