Liking cljdoc? Tell your friends :D

day8.re-frame.fetch-fx


->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

abortcljs

(abort {:keys [request-id]})
source

abort-fxcljs

(abort-fx effect)
source

body-problem-handlercljs

(body-problem-handler {:as request
                       :keys [request-id on-failure]
                       :or {on-failure [:fetch-no-on-failure]}}
                      response
                      reader-kw
                      js-error)
source

body-success-handlercljs

(body-success-handler {:as request
                       :keys [request-id on-success on-failure]
                       :or {on-success [:fetch-no-on-success]
                            on-failure [:fetch-no-on-failure]}}
                      response
                      reader-kw
                      js-body)
source

fetchcljs

(fetch {:keys [url timeout params request-id on-request-id]
        :as request
        :or {request-id (keyword (gensym "fetch-fx-"))}})

Initialise the request. Returns nil.

Initialise the request. Returns nil.
sourceraw docstring

fetch-fxcljs

(fetch-fx effect)
source

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

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

request->js-initcljs

(request->js-init {:keys [method headers request-content-type 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->js-abort-controllercljs

source

response->reader-kwcljs

(response->reader-kw {:keys [response-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-problem-handlercljs

(response-problem-handler {:as request
                           :keys [request-id on-failure]
                           :or {on-failure [:fetch-no-on-failure]}}
                          js-error)
source

response-success-handlercljs

(response-success-handler request js-response)

Reads the js/Response JavaScript Object stream to completion. Returns nil.

Reads the js/Response JavaScript Object stream to completion. 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

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

× close