(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.
(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.
(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]].
(delivery-job-id rec__3187__auto__)
(delivery-job-id data__3188__auto__ v__3189__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]].
(delivery-job-info rec__3187__auto__)
(delivery-job-info data__3188__auto__ v__3189__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]].
(delivery-job-request rec__3187__auto__)
(delivery-job-request data__3188__auto__ v__3189__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]].
(delivery-job-response rec__3187__auto__)
(delivery-job-response data__3188__auto__ v__3189__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]].
(delivery-job-status rec__3187__auto__)
(delivery-job-status data__3188__auto__ v__3189__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]].
(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]].
(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.
(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.
(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
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]]
(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]]
(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]]
(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.
(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)`.
(request-f rec__3187__auto__)
(request-f data__3188__auto__ v__3189__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]].
(request-options rec__3187__auto__)
(request-options data__3188__auto__ v__3189__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]].
(request-uri rec__3187__auto__)
(request-uri data__3188__auto__ v__3189__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]].
(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]].
(response-ok? rec__3187__auto__)
(response-ok? data__3188__auto__ v__3189__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]].
(response-value rec__3187__auto__)
(response-value data__3188__auto__ v__3189__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]].
(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]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close