Liking cljdoc? Tell your friends :D

boulder.ring-adapter


create-simple-handlerclj

(create-simple-handler agent-fetcher)
(create-simple-handler
  agent-fetcher
  {:keys [agent-name-finder params-extractor]
   :or {agent-name-finder (fn* [p1__9926#] (-> p1__9926# :query-params :agent))
        params-extractor (fn* [p1__9927#] (-> p1__9927# :body-params))}
   :as _opts})

agent-fetcher is a f that returns a f that will be called with the extracted request parameters

opts takes:

  • :agent-name-finder: a f that, given the request, returns the name of the agent. Default behavior if nil is to grab the agent parameter from :query-params

  • :params-extractor: a f that, given the request, returns the parameters to be sent to the agent.

`agent-fetcher` is a f that returns a f that will be called with the
extracted request parameters 

`opts` takes:

* `:agent-name-finder`: a f that, given the request, returns the
name of the agent. Default behavior if `nil` is to grab the `agent`
parameter from `:query-params`

* `:params-extractor`: a f that, given the request, returns the
parameters to be sent to the agent.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close