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.
raw docstring

charsetclj

(charset ctx)

content-typeclj

(content-type ctx)

default-error-interceptor-chainclj


default-interceptor-chainclj


error-interceptor-chaincljmultimethod

raw docstring

get-host-originclj

(get-host-origin req)

handlerclj

(handler resource)
(handler resource options)

Create a Ring handler

Create a Ring handler
raw docstring

href-forclj


interceptor-chaincljmultimethod

raw docstring

languageclj

(language ctx)

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}
raw docstring

path-forclj


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.
raw docstring

request-forclj

(request-for method uri options)

resourceclj

(resource model)

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 …})
raw 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.
raw docstring

safe-relative-fileclj

(safe-relative-file parent path)

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.
raw docstring

scheme-forclj


servercljdeprecated


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

(unset-cookie ctx id)

Take a cookie defined in the resource and expire it

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

uri-infoclj

(uri-info ctx handler & [options])

url-forclj


yadaclj

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

× close