Liking cljdoc? Tell your friends :D

day8.re-frame.http-fx-alpha


+profilescljs

(+profiles {:keys [profiles] :as request-state})
sourceraw docstring

->seqcljs

(->seq x)

Returns x if x satisfies ISequential, otherwise vector of x.

Returns x if x satisfies ISequential, otherwise vector of x.
sourceraw docstring

->strcljs

(->str x)

Returns the name String of x if x is a symbol or keyword, otherwise x.toString().

Returns the name String of x if x is a symbol or keyword, otherwise
x.toString().
sourceraw docstring

abort-event-handlercljs

(abort-event-handler _ [_ request-id])

Generic HTTP abort event handler.

Generic HTTP abort event handler.
sourceraw docstring

actioncljsmultimethod

source

body-failed-handlercljs

(body-failed-handler request-id response reader js-error)

Dispatches the request with request-id and the associated response to the in-failed event handler due to a failure reading the body. Returns nil.

Dispatches the request with request-id and the associated response to the
in-failed event handler due to a failure reading the body. Returns nil.
sourceraw docstring

body-handlercljs

(body-handler request-id response reader js-body)

Dispatches the request with request-id and the associated response with a body to the appropriate event handler. Returns nil.

Dispatches the request with request-id and the associated response with a
body to the appropriate event handler. Returns nil.
sourceraw docstring

conj-profilescljs

(conj-profiles request-state seq-of-profile-maps)

Returns a new request-state map with the seq-of-profile-maps 'added'.

Returns a new request-state map with the seq-of-profile-maps 'added'.
sourceraw docstring

fetchcljs

(fetch {:keys [request-id]})

Initiate the request. Returns nil.

Initiate the request. Returns nil.
sourceraw docstring

fsmcljs

A mapping of states to valid transitions out of that state.

A mapping of states to valid transitions out of that state.
sourceraw docstring

fsm->!cljs

(fsm->! request-id to-state)
(fsm->! request-id to-state merge-request-state)

Moves state of request with request-id to-state if it is a valid state transition, otherwise to :failed. Dispatches to the appropriate event handler. Returns nil.

Moves state of request with request-id to-state if it is a valid state
transition, otherwise to :failed. Dispatches to the appropriate event handler.
Returns nil.
sourceraw docstring

fsm->event-keyscljs

A mapping of states to the event handler to dispatch in that state.

A mapping of states to the event handler to dispatch in that state.
sourceraw docstring

fsm-swap-fncljs

(fsm-swap-fn current request-id to-state merge-request-state)

In current value of request-id->request-and-controller moves state of request with request-id to-state if it is a valid state transition, otherwise moves state to :failed.

In current value of request-id->request-and-controller moves state of request
with request-id to-state if it is a valid state transition, otherwise moves
state to :failed.
sourceraw docstring

get-profilecljs

(get-profile profiles profile-id)

Returns a profile map for the profile-id if one exists in profiles, otherwise nil.

Returns a profile map for the profile-id if one exists in profiles, otherwise
nil.
sourceraw docstring

get-profilescljs

(get-profiles profile-id)

Returns a lazy sequence of profile maps for the profile-id(s).

Returns a lazy sequence of profile maps for the profile-id(s).
sourceraw docstring

headers->jscljs

(headers->js headers)

Returns a new js/Headers JavaScript object of the ClojureScript map of headers.

Returns a new js/Headers JavaScript object of the ClojureScript map of headers.
sourceraw docstring

http-fxcljs

(http-fx effect)

Executes the HTTP effect via value-based dispatch to sub-effects.

Executes the HTTP effect via value-based dispatch to sub-effects.
sourceraw docstring

js-headers->cljcljs

(js-headers->clj js-headers)

Returns a new ClojureScript map of the js/Headers JavaScript object.

Returns a new ClojureScript map of the js/Headers JavaScript object.
sourceraw docstring

js-response->cljcljs

(js-response->clj js-response)

Returns a new ClojureScript map of the js/Response JavaScript object.

Returns a new ClojureScript map of the js/Response JavaScript object.
sourceraw docstring

params->strcljs

(params->str params)

Returns a URI-encoded string of the params.

Returns a URI-encoded string of the params.
sourceraw docstring

problem-handlercljs

(problem-handler request-id js-error)
source

profile-id->profilecljs

An Atom that contains a mapping of profile-ids to profile maps.

An Atom that contains a mapping of profile-ids to profile maps.
sourceraw docstring

profile-swap-fncljs

(profile-swap-fn current {profile-id :id default? :default? :as profile})
source

request->js-initcljs

(request->js-init {:keys [method headers body mode credentials cache redirect
                          referrer integrity]
                   :as request}
                  js-controller)

Returns an init options js/Object to use as the second argument to js/fetch.

Returns an init options js/Object to use as the second argument to js/fetch.
sourceraw docstring

request-id->request-and-controllercljs

An Atom that contains a mapping of request-ids to requests and their associated js/AbortController; i.e., {:http-123 {::request {:state :waiting :method... } ::js-controller js/AbortController}}

An Atom that contains a mapping of request-ids to requests and their
associated js/AbortController; i.e.,
{:http-123 {::request {:state :waiting :method... }
            ::js-controller js/AbortController}}
sourceraw docstring

response->readercljs

(response->reader {:keys [content-types]} response)

Returns a keyword of the type of reader to use for the body of the response according to the Content-Type header.

Returns a keyword of the type of reader to use for the body of the
response according to the Content-Type header.
sourceraw docstring

response-handlercljs

(response-handler request-id js-response)

Reads the js/Response JavaScript object stream, that is associated with the request with request-id, to completion. Returns nil.

Reads the js/Response JavaScript object stream, that is associated with the
request with request-id, to completion. Returns nil.
sourceraw docstring

setupcljs

(setup {:keys [url params] :as request})

Initialise the request. Returns nil.

Initialise the request. Returns nil.
sourceraw docstring

timeout-racecljs

(timeout-race js-promise timeout)

Returns a js/Promise JavaScript object that is a race between another js/Promise JavaScript object and timeout in ms if timeout is not nil, otherwise js-promise.

Returns a js/Promise JavaScript object that is a race between another
js/Promise JavaScript object and timeout in ms if timeout is not nil,
otherwise js-promise.
sourceraw docstring

trigger->to-statecljs

A mapping of triggers to states.

A mapping of triggers to states.
sourceraw docstring

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

× close