Liking cljdoc? Tell your friends :D

yada.yada


as-resourceclj

(as-resource _)

Coerce to a resource. Often, resources need to be coerced rather than extending types directly with the Resource protocol. We can exploit the time of coercion to know the time of birth for the resource, which supports time-based conditional requests. For example, a simple StringResource is immutable, so by knowing the time of construction, we can precisely state its Last-Modified-Date.

Coerce to a resource. Often, resources need to be
coerced rather than extending types directly with the Resource
protocol. We can exploit the time of coercion to know the time of
birth for the resource, which supports time-based conditional
requests. For example, a simple StringResource is immutable, so by
knowing the time of construction, we can precisely state its
Last-Modified-Date.
sourceraw docstring

charsetclj

(charset ctx)
source

content-typeclj

(content-type ctx)
source

default-error-interceptor-chainclj

source

default-interceptor-chainclj

source

error-interceptor-chaincljmultimethod

sourceraw docstring

get-host-originclj

(get-host-origin req)
source

handlerclj

(handler resource)
(handler resource options)

Create a Ring handler

Create a Ring handler
sourceraw docstring

href-forclj

source

interceptor-chaincljmultimethod

sourceraw docstring

languageclj

(language ctx)
source

listenerclj

(listener routes & [aleph-options])

Start an HTTP listener on a given port. If not specified, listener will be started on any available port. Returns {:port port :close fn}

Start an HTTP listener on a given port. If not specified, listener
will be started on any available port. Returns {:port port :close fn}
sourceraw docstring

path-forclj

source

redirectclj

(redirect first-arg & args)

There are 2 different redirects in yada, one to construct a redirecting resource, the other, to be used in a response function to augment a yada context. Since we want the function name to be 'redirect', this proxy function delegates to the correct implementation.

There are 2 different redirects in yada, one to construct a
redirecting resource, the other, to be used in a response function
to augment a yada context. Since we want the function name to be
'redirect', this proxy function delegates to the correct
implementation.
sourceraw docstring

request-forclj

(request-for method uri options)
source

resourceclj

(resource model)
source

response-forclj

(response-for o)
(response-for o method)
(response-for o method uri)
(response-for o method uri options)

Produces yada responses for a number of types. Maps are interpreted as resource-maps, vectors are bidi routes. If you want these as bodies, use (response-for {:response …})

Produces yada responses for a number of types. Maps are interpreted
as resource-maps, vectors are bidi routes. If you want these as
bodies, use (response-for {:response …})
sourceraw docstring

routesclj

(routes routes & [{:keys [pre post] :or {pre identity post identity}}])

Process a route structure, interpretting any 'naked' maps in the Matched position as resource-models and converting them into resources. A pre-processing function can be provided that will be called on each naked map prior to the map being turned into a resource (with consequent schema checking). A post-processing function can also be provided that will post-process the actual resource records, after the schema check.

Process a route structure, interpretting any 'naked' maps in the
Matched position as resource-models and converting them into
resources. A pre-processing function can be provided that will be
called on each naked map prior to the map being turned into a
resource (with consequent schema checking). A post-processing
function can also be provided that will post-process the actual
resource records, after the schema check.
sourceraw docstring

safe-relative-fileclj

(safe-relative-file parent path)
source

safe-relative-pathclj

(safe-relative-path parent path)

Given a parent java.nio.file.Path, return a child that is guaranteed not to ascend the parent. This is to ensure access cannot be made to files outside of the parent root.

Given a parent java.nio.file.Path, return a child that is
guaranteed not to ascend the parent. This is to ensure access cannot
be made to files outside of the parent root.
sourceraw docstring

scheme-forclj

source

servercljdeprecated

source

(set-cookie ctx id val)

Take a cookie defined in the resource and set it on the response.

Take a cookie defined in the resource and set it on the response.
sourceraw docstring

swaggeredclj

(swaggered routes & [template])
source

(unset-cookie ctx id)

Take a cookie defined in the resource and expire it

Take a cookie defined in the resource and expire it
sourceraw docstring

uri-infoclj

(uri-info ctx handler & [options])
source

url-forclj

source

yadaclj

source

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

× close