(ajax params-map)
Universal ajax call
:url Define url address to communicate with :request-method Define request method ex. GET, POST... :success-fn Specify function name which will handle success
example: (defn success-handler
"Simple ajax success handler"
[xhr
params-map]
implementation..)
:error-fn Specify function name which will handle error
example: (defn error-handler
"Simple ajax error handler"
[xhr
params-map]
implementation..)
:request-header-map Define map with key value pairs for request header :request-property-map Define map with key value pairs for setting property values :entity Define content that you want to send :entity-fn-params In case entity is a function, define vector of it's params example: [param1 param2] :log-it true/false by default nil
Universal ajax call :url Define url address to communicate with :request-method Define request method ex. GET, POST... :success-fn Specify function name which will handle success example: (defn success-handler "Simple ajax success handler" [xhr params-map] implementation..) :error-fn Specify function name which will handle error example: (defn error-handler "Simple ajax error handler" [xhr params-map] implementation..) :request-header-map Define map with key value pairs for request header :request-property-map Define map with key value pairs for setting property values :entity Define content that you want to send :entity-fn-params In case entity is a function, define vector of it's params example: [param1 param2] :log-it true/false by default nil
(get-response xhr)
Get response from XMLHttpRequest
Get response from XMLHttpRequest
(onready xhr params-map)
Ajax onreadystatechange function
Ajax onreadystatechange function
(set-request-header xhr [key value])
Set request header
Set request header
(set-request-property xhr [key value])
Set request property
Set request property
(sjax params-map)
Synchronous javascript and XML
Same as ajax, except this function waits for server response
Synchronous javascript and XML Same as ajax, except this function waits for server response
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close