Liking cljdoc? Tell your friends :D

ajax.easy


default-error-handlerclj/s

This will be called when errors occur if you don't supply an error handler to the easy API functions. If you don't want it writing errors to the console (or worse, flashing up alerts), make sure you always handle errors.

This will be called when errors occur if you don't supply
an error handler to the easy API functions. If you don't
want it writing errors to the console (or worse, flashing up
alerts), make sure you always handle errors.
sourceraw docstring

default-formatsclj/s

source

default-handlerclj/s

This gets called if you forget to attach a handler to an easy API function.

This gets called if you forget to attach a handler to an easy
API function.
sourceraw docstring

detect-response-formatclj/s

(detect-response-format)
(detect-response-format opts)
source

easy-ajax-requestclj/s

(easy-ajax-request uri method opts)
source

keyword-request-formatclj/s

(keyword-request-format format format-params)

Converts an easy API request format specifier to an ajax-request request format specifier.

Converts an easy API request format specifier to an `ajax-request`
request format specifier.
sourceraw docstring

keyword-response-formatclj/s

(keyword-response-format format format-params)

Converts an easy API format specifier to an ajax-request format specifier. Mostly this is just a case of replacing :json with json-response-format. However, it gets complex when you specify a detection format such as [["application/madeup" :json]].

Converts an easy API format specifier to an `ajax-request`
format specifier. Mostly this is just a case of replacing `:json`
with `json-response-format`. However, it gets complex when you
specify a detection format such as `[["application/madeup" :json]]`.
sourceraw docstring

(print-error-response response)
source

(print-response response)
source

transform-handlerclj/s

(transform-handler {:keys [handler error-handler finally]})

Converts easy API handlers to a ajax-request handler

Converts easy API handlers to a `ajax-request` handler
sourceraw docstring

transform-optsclj/s

(transform-opts {:keys [method format response-format params body] :as opts})

Note that if you call GET, POST et al, this function gets called and will include Transit code in your JS. If you don't want this to happen, use ajax-request directly (and use advanced optimisation).

Note that if you call GET, POST et al, this function gets
called and will include Transit code in your JS.
If you don't want this to happen, use ajax-request directly
(and use advanced optimisation).
sourceraw docstring

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

× close