(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]
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](get-response xhr & [raw])Get response from XMLHttpRequest
Get response from XMLHttpRequest
(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 builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |