Liking cljdoc? Tell your friends :D

adl-support.rest-support

Application Description Language support - functions useful in generating JSON route handlers.

Application Description Language support - functions useful in
generating JSON route handlers.
raw docstring

do-or-server-failcljmacro

(do-or-server-fail form status)

Evaluate this form; if it succeeds, return an HTTP response with this status code and the JSON-formatted result as body; if it fails, return an HTTP 500 response.

Evaluate this `form`; if it succeeds, return an HTTP response with this
status code and the JSON-formatted result as body; if it fails, return an
HTTP 500 response.
sourceraw docstring

if-valid-usercljmacro

(if-valid-user form request)
(if-valid-user form request error-return)

Evaluate this form only if there is a valid user in the session of this request; otherwise return the error-return value.

Evaluate this `form` only if there is a valid user in the session of
this `request`; otherwise return the `error-return` value.
sourceraw docstring

valid-user-or-forbidcljmacro

(valid-user-or-forbid form request)

Evaluate this form only if there is a valid user in the session of this request; otherwise return an HTTP forbidden response.

Evaluate this `form` only if there is a valid user in the session of
this `request`; otherwise return an HTTP forbidden response.
sourceraw docstring

with-params-or-errorcljmacro

(with-params-or-error form params required)

Evaluate this form only if these params contain all these required keys; otherwise return an HTTP 400 response.

Evaluate this `form` only if these `params` contain all these `required` keys;
otherwise return an HTTP 400 response.
sourceraw docstring

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

× close