Liking cljdoc? Tell your friends :D

fx.ring


build-fx-contextclj

(build-fx-context req opts)

Constructs the execution context map for an effect run. Merges resolved provider/services with {request-key req}.

Constructs the execution context map for an effect run.
Merges resolved provider/services with {request-key req}.
raw docstring

request-keyclj


resolve-failure-to-responseclj

(resolve-failure-to-response failure req)
(resolve-failure-to-response failure req {:keys [failure-map default-handler]})

Converts an IFailure into an HTTP Ring response map using a hybrid resolution strategy:

  1. Check :failure-map for explicit tag match.
  2. Check if error-data contains :status key.
  3. Fallback to :default-handler (or default 500 response).
Converts an IFailure into an HTTP Ring response map using a hybrid resolution strategy:
1. Check :failure-map for explicit tag match.
2. Check if error-data contains :status key.
3. Fallback to :default-handler (or default 500 response).
raw docstring

wrap-fxclj

(wrap-fx effect)
(wrap-fx effect opts)

Converts a pure IEffect pipeline into a standard Ring HTTP handler. Supports 1-arity synchronous (fn [req]) and 3-arity asynchronous (fn [req respond raise]).

Options: :provider - Map or (fn [req]) providing external dependencies / services :context - Alias for :provider :services - Alias for :provider :failure-map - Map of failure tags to handler functions (fn [error-data req]) :default-handler - Fallback failure handler function (fn [failure req])

Converts a pure IEffect pipeline into a standard Ring HTTP handler.
Supports 1-arity synchronous (fn [req]) and 3-arity asynchronous (fn [req respond raise]).

Options:
  :provider        - Map or (fn [req]) providing external dependencies / services
  :context         - Alias for :provider
  :services        - Alias for :provider
  :failure-map     - Map of failure tags to handler functions (fn [error-data req])
  :default-handler - Fallback failure handler function (fn [failure req])
raw docstring

wrap-fx-failuresclj

(wrap-fx-failures handler)
(wrap-fx-failures handler opts)

Converts IFailure instances returned by a Ring handler to Ring HTTP responses. Options: :failure-map - Map of tag -> (fn [error-data req]) or (fn [error-data]) or response-map :default-handler - Fallback (fn [failure req]) returning a response map

Converts IFailure instances returned by a Ring handler to Ring HTTP responses.
Options:
  :failure-map     - Map of tag -> (fn [error-data req]) or (fn [error-data]) or response-map
  :default-handler - Fallback (fn [failure req]) returning a response map
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close