(->bb-req request)(<-bb-response response)(wrap-request-handler handler)Middleware that adapts internal engine requests to Babashka HTTP client format and vice versa.
It translates the incoming request, executes the wrapped handler, unifies any network
exceptions under the :http/failure error code, and transforms the response back
to the engine's expected format.
Args:
Returns: A new function that accepts an internal engine request map and returns an internal engine response map.
Middleware that adapts internal engine requests to Babashka HTTP client format and vice versa. It translates the incoming request, executes the wrapped handler, unifies any network exceptions under the `:http/failure` error code, and transforms the response back to the engine's expected format. Args: - handler : A function that executes a Babashka-compatible HTTP request. Returns: A new function that accepts an internal engine request map and returns an internal engine response map.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |