Liking cljdoc? Tell your friends :D

ajax-lib.core


ajaxcljs

(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]
sourceraw docstring

ajax-errorcljs

(ajax-error xhr)

Handle details error

Handle details error
sourceraw docstring

base-urlcljs

source

get-responsecljs

(get-response xhr & [raw])

Get response from XMLHttpRequest

Get response from XMLHttpRequest
sourceraw docstring

sjaxcljs

(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
sourceraw docstring

with-credentialscljs

source

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

× close