Liking cljdoc? Tell your friends :D

Interceptors

The interceptor chain, established on the creation of a resource. A resource’s interceptor chain can be modified from the defaults.

Core interceptors

(coming soon)

available?

(coming soon)

known-method?

(coming soon)

uri-too-long?

(coming soon)

TRACE

(coming soon)

method-allowed?

(coming soon)

parse-parameters

(coming soon)

authenticate

(coming soon)

get-properties

(coming soon)

authorize

(coming soon)

process-request-body

(coming soon)

check-modification-time

(coming soon)

select-representation

(coming soon)

if-match

(coming soon)

if-none-match

(coming soon)

invoke-method

(coming soon)

get-new-properties

(coming soon)

compute-etag

(coming soon)

access-control-headers

(coming soon)

create-response

(coming soon)

logging

(coming soon)

return

(coming soon)

Modifying interceptor chains

Say you want to modify the interceptor chain for a given resource.

You might want to put your interceptor(s) at the front.

(yada.resource/prepend-interceptor
  resource
  my-interceptor-a
  my-interceptor-b)

Alternatively, you might want to replace some existing core interceptors:

(update resource
  :interceptor-chain
  (partial replace {yada.interceptors/logging my-logging
                    yada.security/authorize my-authorize}))

Or you may want to insert some of your own before a given interceptor:

(yada.resource/insert-interceptor
  resource yada.security/authorize my-pre-authorize)

You can also append interceptors after a given interceptor:

(yada.resource/append-interceptor
  resource yada.security/authorize my-post-authorize)

Can you improve this documentation?Edit on GitHub

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

× close