Ring handler for Undertow server.
Ring handler for Undertow server.
(adapter config)Returns handler function adapter for :ring-handler-type key in server
configuration.
Returns handler function adapter for `:ring-handler-type` key in server configuration.
(async handler-fn)(async handler-fn timeout-ms)Returns HttpHandler for asynchronous ring handler function with
async timeout millis. Default timeout is 30000 millis.
The function handler-fn takes three arguments: the request map, a response
callback and an exception callback.
Returns HttpHandler for **asynchronous** [ring handler function][1] with async `timeout` millis. Default timeout is `30000` millis. The function `handler-fn` takes three arguments: the request map, a response callback and an exception callback. [1]: https://github.com/ring-clojure/ring/wiki/Concepts#handlers
(ring {:keys [ring-handler] :as config})Returns HttpHandler for ring handler function.
:ring-handler The function to return HttpHandler for.
:ring-handler-type The type of all ring handlers in the configuration.
Can be used declaratively in server-configuration:
(server/start {:handler {:type ring, :ring-handler my-handler-fn}})
(server/start {:handler {:type ring, :ring-handler my-handler-fn,
:ring-handler-type :async}})
NOTE: The strojure.ring-undertow.handler namespace need to be imported to
make declarative configuration available.
Returns HttpHandler for [ring handler function][1].
- `:ring-handler` The function to return `HttpHandler` for.
- `:ring-handler-type` The type of all ring handlers in the configuration.
- No value or value `:sync` means synchronous ring handler [[sync]].
- Value `:async` means asynchronous ring handler [[async]].
Can be used declaratively in server-configuration:
(server/start {:handler {:type ring, :ring-handler my-handler-fn}})
(server/start {:handler {:type ring, :ring-handler my-handler-fn,
:ring-handler-type :async}})
NOTE: The `strojure.ring-undertow.handler` namespace need to be imported to
make declarative configuration available.
[1]: https://github.com/ring-clojure/ring/wiki/Concepts#handlers
(sync handler-fn)Returns HttpHandler for synchronous ring handler function.
The function handler-fn takes one argument, a map representing a HTTP
request, and return a map representing the HTTP response.
Returns HttpHandler for **synchronous** [ring handler function][1]. The function `handler-fn` takes one argument, a map representing a HTTP request, and return a map representing the HTTP response. [1]: https://github.com/ring-clojure/ring/wiki/Concepts#handlers
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 |