Liking cljdoc? Tell your friends :D

strojure.ring-undertow.handler

Ring handler for Undertow server.

Ring handler for Undertow server.
raw docstring

adaptercljmultimethod

(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.
sourceraw docstring

asyncclj

(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
sourceraw docstring

ringclj

(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.

    • 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.

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
sourceraw docstring

syncclj

(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
sourceraw docstring

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

× close