Liking cljdoc? Tell your friends :D

dgknght.app-lib.api


acceptcljs

(accept req content-type)
source

bad-requestclj

source

content-typecljs

(content-type req content-type)
source

creation-responseclj

(creation-response model)
source

defaultscljs

source

deletecljs

(delete path success-fn error-fn)
(delete path options success-fn error-fn)
source

forbiddenclj

source

getcljs

(get path success-fn error-fn)
(get path criteria success-fn error-fn)
(get path criteria options success-fn error-fn)
source

(header req k v)
source

internal-server-errorclj

source

json-paramscljs

(json-params req params)
source

multipart-paramscljs

(multipart-params req params)
source

no-contentclj

source

not-foundclj

source

patchcljs

(patch path model success-fn error-fn)
(patch path model options success-fn error-fn)
source

pathcljs

(path & segments)
source

postcljs

(post path success-fn error-fn)
(post path model success-fn error-fn)
(post path model options success-fn error-fn)
source

post-filescljs

(post-files path content success-fn error-fn)
(post-files uri content options success-fn error-fn)

Post files to the server. The files can be extracted from a drop event like this:

(defn- handle-drop [e page-state] (.preventDefault e) (let [file-list (aget e "dataTransfer" "files") file-count (aget file-list "length") files (mapv #(.item file-list %) (range file-count))] (swap! page-state update-in [:invitations :import-data :files] (fnil concat []) files)))

Post files to the server. The files can be extracted from a drop event like this:

(defn- handle-drop
  [e page-state]
  (.preventDefault e)
  (let [file-list (aget e "dataTransfer" "files")
        file-count (aget file-list "length")
        files (mapv #(.item file-list %) (range file-count))]
    (swap! page-state update-in [:invitations :import-data :files] (fnil concat []) files)))
sourceraw docstring

requestcljs

(request)
(request options)
source

responseclj

(response)
(response body)
(response body status)
source

teapotclj

source

unauthorizedclj

source

unprocessableclj

source

update-responseclj

(update-response model)
source

wrap-api-exceptionclj

(wrap-api-exception handler)
source

wrap-authenticationclj

(wrap-authentication handler {:keys [authenticate-fn]})

Wraps the handler with an authentication lookup, passing the request on to the handle step in the handler if the authentication function returns non-nil, otherwise returing an unauthenticated response.

Options: :authentication-fn - A function accepting one argument (the request) and returning the authentication result, or nil

Wraps the handler with an authentication lookup, passing
the request on to the handle step in the handler if the authentication
function returns non-nil, otherwise returing an unauthenticated response.

Options:
  :authentication-fn - A function accepting one argument (the request) and returning the authentication result, or nil
sourceraw docstring

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

× close