Liking cljdoc? Tell your friends :D

reacl-c-basics.ajax


check-options-invariants!cljs

(check-options-invariants! options)

DELETEcljs

(DELETE uri & [options])

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.
raw docstring

deliverycljs

(delivery item & [f])

Returns an item that manages execution of Ajax requests in its local state. Use deliver to get an action that can be emitted by item that adds a new delivery job to an internal queue.

Jobs transition from a :pending state, over :running into :completed (successful or not), and for each transition (f state job) is evaluated, which must return a [[reacl-c.core/return]] value.

Returns an item that manages execution of Ajax requests in its
local state. Use [[deliver]] to get an action that can be emitted by
`item` that adds a new delivery job to an internal queue.

Jobs transition from a :pending state, over :running
into :completed (successful or not), and for each transition `(f
state job)` is evaluated, which must return
a [[reacl-c.core/return]] value.
raw docstring

delivery-job!cljs

(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]].
raw docstring

delivery-job-idcljs

(delivery-job-id rec__7692__auto__)
(delivery-job-id data__7693__auto__ v__7694__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]].
raw docstring

delivery-job-infocljs

(delivery-job-info rec__7692__auto__)
(delivery-job-info data__7693__auto__ v__7694__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]].
raw docstring

delivery-job-requestcljs

(delivery-job-request rec__7692__auto__)
(delivery-job-request data__7693__auto__ v__7694__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]].
raw docstring

delivery-job-responsecljs

(delivery-job-response rec__7692__auto__)
(delivery-job-response data__7693__auto__ v__7694__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]].
raw docstring

delivery-job-statuscljs

(delivery-job-status rec__7692__auto__)
(delivery-job-status data__7693__auto__ v__7694__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]].
raw 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]].
raw docstring

DeliveryJobcljs


error-responsecljs

(error-response status & [body])

executecljs

(execute request)

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.
raw 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 state 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 state response)` is evaluated, which
must return a [[reacl-c.core/return]] value.
raw docstring

GETcljs

(GET uri & [options])

(HEAD uri & [options])

job-executorcljs

(job-executor f)

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]]
raw docstring

make-requestcljs

(make-request f uri options)

Construct a Request record.

f: access via reacl-c-basics.ajax/request-f uri: access via reacl-c-basics.ajax/request-uri options: access via reacl-c-basics.ajax/request-options

Construct a `Request` record.

`f`: access via [[reacl-c-basics.ajax/request-f]]
`uri`: access via [[reacl-c-basics.ajax/request-uri]]
`options`: access via [[reacl-c-basics.ajax/request-options]]
raw docstring

make-responsecljs

(make-response ok? value)

Construct a Response record.

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

Construct a `Response` record.

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

map-ok-responsecljs

(map-ok-response req f & args)

Convert the response-value to the given request through a call to (f response & args) if it's an ok response.

Convert the [[response-value]] to the given request through a
call to `(f response & args)` if it's an ok response.
raw docstring

map-responsecljs

(map-response req f & args)

Convert the response to the given request through a call to (f response & args).

Convert the response to the given request through a call to `(f response & args)`.
raw docstring

maybe-show-response-valuecljs

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

ok-responsecljs

(ok-response result)

OPTIONScljs

(OPTIONS uri & [options])

PATCHcljs

(PATCH uri & [options])

POSTcljs

(POST uri & [options])

PURGEcljs

(PURGE uri & [options])

PUTcljs

(PUT uri & [options])

Requestcljs


request-fcljs

(request-f rec__7692__auto__)
(request-f data__7693__auto__ v__7694__auto__)

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

Lens for the `f` field from a [[Request]] record. See [[reacl-c-basics.ajax/make-request]].
raw docstring

request-optionscljs

(request-options rec__7692__auto__)
(request-options data__7693__auto__ v__7694__auto__)

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

Lens for the `options` field from a [[Request]] record. See [[reacl-c-basics.ajax/make-request]].
raw docstring

request-uricljs

(request-uri rec__7692__auto__)
(request-uri data__7693__auto__ v__7694__auto__)

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

Lens for the `uri` field from a [[Request]] record. See [[reacl-c-basics.ajax/make-request]].
raw docstring

request?cljs

(request? thing)

Is object a Request record? See reacl-c-basics.ajax/make-request.

Is object a `Request` record? See [[reacl-c-basics.ajax/make-request]].
raw docstring

Responsecljs


response-ok?cljs

(response-ok? rec__7692__auto__)
(response-ok? data__7693__auto__ v__7694__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]].
raw docstring

response-valuecljs

(response-value rec__7692__auto__)
(response-value data__7693__auto__ v__7694__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]].
raw 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]].
raw docstring

show-response-valuecljs

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

throw-response-errorcljs

(throw-response-error error)

TRACEcljs

(TRACE uri & [options])

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

× close