(build-http-options http-options method no-cache?)
Build http-options based on arguments.
Build http-options based on arguments.
(debug-api method url http-options {:keys [status body request] :as response})
Print out debug information.
Print out debug information.
(get-xhr-io-response io-obj
&
[{:keys [require-json?] :or {:require-json? true}}])
Get the response out of an object that watches an async/xhr request. JsIoObject, Maybe {Keyword Bool} -> {:keyword }
Get the response out of an object that watches an async/xhr request. JsIoObject, Maybe {Keyword Bool} -> {:keyword }
(http-request method url http-options)
Send HTTP request and handle exceptions
Send HTTP request and handle exceptions
(http-request request-fn & args)
Wraps cljs-http.client/request and redirects if status is 401
Wraps cljs-http.client/request and redirects if status is 401
(multipart-options file name)
Parse file and return multipart options
Parse file and return multipart options
(parse-binary-response body filename)
Parse binary response by writing into a temp file and returning the path.
Parse binary response by writing into a temp file and returning the path.
(parse-json-response body)
Parse a body as JSON catching formatting exceptions.
Parse a body as JSON catching formatting exceptions.
(parse-response body status filename raw-response?)
Parse a response based on status, filename, and flags
Parse a response based on status, filename, and flags
An almost 'batteries-included' request, similar to cljs-http.client/request. Contains everything except response decoding.
An almost 'batteries-included' request, similar to cljs-http.client/request. Contains everything except response decoding.
(token->headers &
{:keys [get-crsftoken? must-revalidate? accept-header
auth-token]})
Builds request headers for the HTTP request by adding Authorization, X-CSRFToken and Cache-control headers where necessary
Builds request headers for the HTTP request by adding Authorization, X-CSRFToken and Cache-control headers where necessary
(upload-file form
chan
&
{:keys [headers id require-json?] :or {:require-json? true}})
Use goog.net.XhrIo to upload file. Receives an HTML form object, a core.async channel where result message will be put and (optionally) an id to include in the result message. Returns the XhrIo object that can be used to abort request. More XhrIo API docs at: https://goo.gl/B0fm2a
Use goog.net.XhrIo to upload file. Receives an HTML form object, a core.async channel where result message will be put and (optionally) an id to include in the result message. Returns the XhrIo object that can be used to abort request. More XhrIo API docs at: https://goo.gl/B0fm2a
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close