Liking cljdoc? Tell your friends :D

milia.api.io


build-http-optionscljs

(build-http-options http-options method no-cache?)

Build http-options based on arguments.

Build http-options based on arguments.
sourceraw docstring

build-reqclj

(build-req)
(build-req http-options)
source

call-client-methodclj

(call-client-method method url req)
source

debug-apiclj

(debug-api method url http-options {:keys [status body request] :as response})

Print out debug information.

Print out debug information.
sourceraw docstring

get-xhr-io-responsecljs

(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 }
sourceraw docstring

http-requestclj/s≠

clj
(http-request method url http-options)

Send HTTP request and handle exceptions

Send HTTP request and handle exceptions
cljs
(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
source (clj)source (cljs)raw docstring

multipart-optionsclj

(multipart-options file name)

Parse file and return multipart options

Parse file and return multipart options
sourceraw docstring

parse-binary-responseclj

(parse-binary-response body filename & {:keys [url http-options]})

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.
sourceraw docstring

parse-json-responseclj

(parse-json-response body)

Parse a body as JSON catching formatting exceptions.

Parse a body as JSON catching formatting exceptions.
sourceraw docstring

parse-responseclj

(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
sourceraw docstring

raw-requestcljs

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.
sourceraw docstring

token->headerscljs

(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
sourceraw docstring

upload-filecljs

(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://developers.google.com/closure/library/docs/xhrio

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://developers.google.com/closure/library/docs/xhrio
sourceraw docstring

upload-via-iframecljs

(upload-via-iframe form form-api event-chan)
source

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

× close