(->seq x)
Returns x if x satisfies ISequential, otherwise vector of x.
Returns x if x satisfies ISequential, otherwise vector of x.
(->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().
(abort-event-handler _ [_ request-id])
Generic HTTP abort event handler.
Generic HTTP abort event handler.
(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.
(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.
(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'.
(fetch {:keys [request-id]})
Initiate the request. Returns nil.
Initiate the request. Returns nil.
A mapping of states to valid transitions out of that state.
A mapping of states to valid transitions out of that state.
(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.
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.
(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.
(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.
(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).
(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.
(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.
(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.
(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.
(params->str params)
Returns a URI-encoded string of the params.
Returns a URI-encoded string of the params.
An Atom that contains a mapping of profile-ids to profile maps.
An Atom that contains a mapping of profile-ids to profile maps.
(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.
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}}
(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.
(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.
(setup {:keys [url params] :as request})
Initialise the request. Returns nil.
Initialise the request. Returns nil.
(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.
A mapping of triggers to states.
A mapping of triggers to states.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close