Liking cljdoc? Tell your friends :D

fifql.server


add-request-middleware!cljs

(add-request-middleware! app)
source

body-parsercljs

source

create-express-request-handlercljs

(create-express-request-handler &
                                {:keys [prepare-stack-machine post-response]
                                 :or {post-response (fn [sm request
                                                         response])}})
sourceraw docstring

create-ring-request-handlerclj

(create-ring-request-handler &
                             {:keys [prepare-stack-machine post-response]
                              :or {post-response (fn [sm request response]
                                                     response)}})

Create a ring request handler for use in an HTTP server.

Keyword Arguments

prepare-stack-machine - Can be either the fif stack-machine to use for queries, or a function of the form (fn [req]) which receives the request map, and expects a stack-machine to be returned.

post-response (optional) - Called after the stack-machine is evaluated. This is an optional function that can perform further modifications on the generated response. Function is of the form (fn [sm request response]), and expects a response map.

Notes

  • prepare-stack-machine allows you to return difference stack machine's with different capabilities based on the current session. This can be useful for providing say a 'logged in' user with more functionality.

  • post-response can allow you to check the stack-machine for login sequences, and change the session data within the response appropriately.

Create a ring request handler for use in an HTTP server.

# Keyword Arguments

prepare-stack-machine - Can be either the fif stack-machine to use
for queries, or a function of the form (fn [req]) which receives the
request map, and expects a stack-machine to be returned.

post-response (optional) - Called after the stack-machine is
evaluated. This is an optional function that can perform further
modifications on the generated response. Function is of the
form (fn [sm request response]), and expects a response map.

# Notes

- prepare-stack-machine allows you to return difference stack
machine's with different capabilities based on the current
session. This can be useful for providing say a 'logged in' user
with more functionality.

- post-response can allow you to check the stack-machine for login
sequences, and change the session data within the response
appropriately.
sourceraw docstring

get-request-input-stringcljs

(get-request-input-string request)
source

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

× close