Liking cljdoc? Tell your friends :D

dgknght.app-lib.api


acceptcljs

(accept req content-type)

append-query-stringcljs

(append-query-string path criteria)

bad-requestclj


content-typecljs

(content-type req content-type)

creation-responseclj

(creation-response model)

defaultscljs


deletecljs

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

extract-errorcljs

(extract-error {:keys [body status]})

forbiddenclj


getcljs

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

(header req k v)

internal-server-errorclj


json-paramscljs

(json-params req params)

multipart-paramscljs

(multipart-params req params)

no-contentclj


not-foundclj


parse-jsoncljs

(parse-json json)

patchcljs

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

pathcljs

(path & segments)

postcljs

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

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)))
raw docstring

requestcljs

(request)
(request options)

responseclj

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

teapotclj


unauthorizedclj


unprocessableclj


update-responseclj

(update-response model)

wrap-api-exceptionclj

(wrap-api-exception handler)

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

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

× close