Liking cljdoc? Tell your friends :D

drawbridge.core

HTTP transport support for Clojure's nREPL implemented as a Ring handler.

HTTP transport support for Clojure's nREPL implemented as a Ring handler.
raw docstring

-mainclj

(-main & args)
source

memory-sessionclj

(memory-session handler
                &
                {:keys [cookie-name] :or {cookie-name "drawbridge-session"}})

Wraps the supplied handler in session middleware that uses a private memory store. Use the :cookie-name option to customize the cookie used here. The cookie name defaults to "drawbridge-session".

Wraps the supplied handler in session middleware that uses a
private memory store. Use the `:cookie-name` option to customize the
cookie used here. The cookie name defaults to
"drawbridge-session".
sourceraw docstring

response-timeout-headerclj

source

ring-handlerclj

(ring-handler &
              {:keys [nrepl-handler default-read-timeout cookie-name]
               :or {nrepl-handler (server/default-handler)
                    default-read-timeout 0
                    cookie-name "drawbridge-session"}})

Returns a Ring handler implementing an HTTP transport endpoint for nREPL.

The handler will work when routed onto any URI. Note that this handler requires the following standard Ring middleware to function properly:

  • keyword-params
  • nested-params
  • wrap-params

a.k.a. the Compojure "api" stack.

nREPL messages should be encoded into POST request parameters; messages are only accepted from POST parameters.

A GET or POST request will respond with any nREPL response messages cached since the last request. If:

  • the handler is created with a non-zero :default-read-timeout, or
  • a session's first request to the handler specifies a non-zero timeout via a REPL-Response-Timeout header

...then each request will wait the specified number of milliseconds for additional nREPL responses before finalizing the response.

All response bodies have an application/json Content-Type, consisting of a map in the case of an error, or an array of nREPL response messages otherwise. These messages are output one per line (/ht CouchDB), like so:

[ {"ns":"user","value":"3","session":"d525e5.."} {"status":["done"],"session":"d525e5.."} ]

A custom nREPL handler may be specified when creating the handler via :nrepl-handler. The default (via (nrepl.server/default-handler)) is appropriate for textual REPL interactions, and includes support for interruptable evaluation, sessions, readably-printed evaluation values, and prompting for in input. Please refer to the main nREPL documentation for details on semantics and message schemas for these middlewares.

Returns a Ring handler implementing an HTTP transport endpoint for nREPL.

The handler will work when routed onto any URI.  Note that this handler
requires the following standard Ring middleware to function properly:

  * keyword-params
  * nested-params
  * wrap-params

a.k.a. the Compojure "api" stack.

nREPL messages should be encoded into POST request parameters; messages
are only accepted from POST parameters.

A GET or POST request will respond with any nREPL response messages cached
since the last request.  If:

  * the handler is created with a non-zero :default-read-timeout, or
  * a session's first request to the handler specifies a non-zero
    timeout via a REPL-Response-Timeout header

...then each request will wait the specified number of milliseconds for
additional nREPL responses before finalizing the response.

All response bodies have an application/json Content-Type, consisting of
a map in the case of an error, or an array of nREPL response messages
otherwise.  These messages are output one per line (/ht CouchDB), like so:

[
{"ns":"user","value":"3","session":"d525e5.."}
{"status":["done"],"session":"d525e5.."}
]

A custom nREPL handler may be specified when creating the handler via
:nrepl-handler.  The default
(via `(nrepl.server/default-handler)`) is appropriate
for textual REPL interactions, and includes support for interruptable
evaluation, sessions, readably-printed evaluation values, and
prompting for *in* input.  Please refer to the main nREPL documentation
for details on semantics and message schemas for these middlewares.
sourceraw docstring

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

× close