Liking cljdoc? Tell your friends :D

reacl-c-basics.ajax


check-options-invariants!cljs

(check-options-invariants! options)
source

DELETEcljs

(DELETE uri & [options])
source

delivercljs

(deliver req & [info])

Returns an action to add the given request to the end of the next queue delivery-queue up in the item tree. An arbitrary info value can be attached, identifying or describing the request.

Returns an action to add the given request to the end of the next
queue [[delivery-queue]] up in the item tree. An arbitrary `info`
value can be attached, identifying or describing the request.
sourceraw docstring

delivery-jobcljs

(delivery-job req & [info])

Returns a new delivery job, that you can put into the state backing up a delivery-queue.

Returns a new delivery job, that you can put into the state backing
up a [[delivery-queue]].
sourceraw docstring

delivery-job-idcljs

(delivery-job-id rec__12352__auto__)
(delivery-job-id data__12353__auto__ v__12354__auto__)

Lens for the id field from a DeliveryJob record. See reacl-c-basics.ajax/make-delivery-job.

Lens for the `id` field from a [[DeliveryJob]] record. See [[reacl-c-basics.ajax/make-delivery-job]].
sourceraw docstring

delivery-job-infocljs

(delivery-job-info rec__12352__auto__)
(delivery-job-info data__12353__auto__ v__12354__auto__)

Lens for the info field from a DeliveryJob record. See reacl-c-basics.ajax/make-delivery-job.

Lens for the `info` field from a [[DeliveryJob]] record. See [[reacl-c-basics.ajax/make-delivery-job]].
sourceraw docstring

delivery-job-requestcljs

(delivery-job-request rec__12352__auto__)
(delivery-job-request data__12353__auto__ v__12354__auto__)

Lens for the req field from a DeliveryJob record. See reacl-c-basics.ajax/make-delivery-job.

Lens for the `req` field from a [[DeliveryJob]] record. See [[reacl-c-basics.ajax/make-delivery-job]].
sourceraw docstring

delivery-job-responsecljs

(delivery-job-response rec__12352__auto__)
(delivery-job-response data__12353__auto__ v__12354__auto__)

Lens for the response field from a DeliveryJob record. See reacl-c-basics.ajax/make-delivery-job.

Lens for the `response` field from a [[DeliveryJob]] record. See [[reacl-c-basics.ajax/make-delivery-job]].
sourceraw docstring

delivery-job-statuscljs

(delivery-job-status rec__12352__auto__)
(delivery-job-status data__12353__auto__ v__12354__auto__)

Lens for the status field from a DeliveryJob record. See reacl-c-basics.ajax/make-delivery-job.

Lens for the `status` field from a [[DeliveryJob]] record. See [[reacl-c-basics.ajax/make-delivery-job]].
sourceraw docstring

delivery-job?cljs

(delivery-job? thing)

Is object a DeliveryJob record? See reacl-c-basics.ajax/make-delivery-job.

Is object a `DeliveryJob` record? See [[reacl-c-basics.ajax/make-delivery-job]].
sourceraw docstring

delivery-queuecljs

(delivery-queue e lens & [options])

Returns an item that manages a sequence of Ajax requests in its state, under the given lens. You can add delivery-job values to it, or use deliver to get an action that can be emitted by e and adds jobs to the end of the queue.

Jobs transition from a :pending state, over :running into :completed (successful or not). When (:auto-cleanup? options) is true, sucessfully completed jobs are eventually removed from the queue automatically. When (:parallel? options) is true, then not only the first non-completed job is executed, but all are started in parallel (though the browser might actually only run 2 at the same time).

Returns an item that manages a sequence of Ajax requests in its
state, under the given `lens`. You can add [[delivery-job]] values
to it, or use [[deliver]] to get an action that can be emitted by
`e` and adds jobs to the end of the queue.

Jobs transition from a :pending state, over :running
into :completed (successful or not).  When `(:auto-cleanup?
options)` is true, sucessfully completed jobs are eventually removed
from the queue automatically. When `(:parallel? options)` is true,
then not only the first non-completed job is executed, but all are
started in parallel (though the browser might actually only run 2 at
the same time).
sourceraw docstring

DeliveryJobcljs

source

fetchcljs

(fetch req)

Returns an invisible item, that will execute the given request whenever its state is or becomes nil, and set its state to the success or error response as soon as available.

Returns an invisible item, that will
execute the given request whenever its state is or becomes nil, and
set its state to the success or error response as soon as
available.
sourceraw docstring

fetch-oncecljs

(fetch-once req f)

Returns an invisible item, that will execute the given Ajax request once, when mounted. When the request completes with an error or success, then (f response) is evaluated, which must return a [[reacl-c.core/return]] value.

Returns an invisible item, that will execute the given Ajax
request once, when mounted. When the request completes with an error
or success, then `(f response)` is evaluated, which
must return a [[reacl-c.core/return]] value.
sourceraw docstring

GETcljs

(GET uri & [options])
source

(HEAD uri & [options])
source

hidden-delivery-queuecljs

(hidden-delivery-queue e & [options])

Like delivery-queue, but with a hidden queue in local state.

Like [[delivery-queue]], but with a hidden queue in local state.
sourceraw docstring

make-delivery-jobcljs

(make-delivery-job id req info status response)
Construct a `DeliveryJob` record.

`id`: access via [[reacl-c-basics.ajax/delivery-job-id]]
`req`: access via [[reacl-c-basics.ajax/delivery-job-request]]
`info`: access via [[reacl-c-basics.ajax/delivery-job-info]]
`status`: access via [[reacl-c-basics.ajax/delivery-job-status]]
`response`: access via [[reacl-c-basics.ajax/delivery-job-response]]
sourceraw docstring

make-responsecljs

(make-response ok? value request)

Construct a Response record.

ok?: access via reacl-c-basics.ajax/response-ok? value: access via reacl-c-basics.ajax/response-value request: access via reacl-c-basics.ajax/response-request

Construct a `Response` record.

`ok?`: access via [[reacl-c-basics.ajax/response-ok?]]
`value`: access via [[reacl-c-basics.ajax/response-value]]
`request`: access via [[reacl-c-basics.ajax/response-request]]
sourceraw docstring

maybe-show-response-valuecljs

(maybe-show-response-value resp e-pending f-ok & [f-error])
source

OPTIONScljs

(OPTIONS uri & [options])
source

PATCHcljs

(PATCH uri & [options])
source

POSTcljs

(POST uri & [options])
source

PURGEcljs

(PURGE uri & [options])
source

PUTcljs

(PUT uri & [options])
source

Responsecljs

source

response-ok?cljs

(response-ok? rec__12352__auto__)
(response-ok? data__12353__auto__ v__12354__auto__)

Lens for the ok? field from a Response record. See reacl-c-basics.ajax/make-response.

Lens for the `ok?` field from a [[Response]] record. See [[reacl-c-basics.ajax/make-response]].
sourceraw docstring

response-requestcljs

(response-request rec__12352__auto__)
(response-request data__12353__auto__ v__12354__auto__)

Lens for the request field from a Response record. See reacl-c-basics.ajax/make-response.

Lens for the `request` field from a [[Response]] record. See [[reacl-c-basics.ajax/make-response]].
sourceraw docstring

response-valuecljs

(response-value rec__12352__auto__)
(response-value data__12353__auto__ v__12354__auto__)

Lens for the value field from a Response record. See reacl-c-basics.ajax/make-response.

Lens for the `value` field from a [[Response]] record. See [[reacl-c-basics.ajax/make-response]].
sourceraw docstring

response?cljs

(response? thing)

Is object a Response record? See reacl-c-basics.ajax/make-response.

Is object a `Response` record? See [[reacl-c-basics.ajax/make-response]].
sourceraw docstring

show-response-valuecljs

(show-response-value resp f-ok & [f-error])
source

throw-response-errorcljs

(throw-response-error response)
source

TRACEcljs

(TRACE uri & [options])
source

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

× close