Liking cljdoc? Tell your friends :D

ajax.formats

This file contains the base formats: raw, text and detect. url, json and transit are found in their own files.

This file contains the base formats: raw, text and detect.
url, json and transit are found in their own files.
raw docstring

accept-headerclj/s

(accept-header {:keys [response-format] :as request})

content-type-matchesclj/s

(content-type-matches content-type accept)

detect-content-typeclj/s

(detect-content-type content-type request format-entry)

detect-response-formatclj/s

(detect-response-format opts)

NB This version of the response format doesn't have a zero arity version. This is because it would involve pulling in every dependency. Instead, core.cljc adds it in.

NB This version of the response format doesn't have a zero
arity version. This is because it would involve pulling
in every dependency. Instead, core.cljc adds it in.
raw docstring

detect-response-format-readclj/s

(detect-response-format-read request)

get-accept-entriesclj/s

(get-accept-entries request format-entry)

get-default-formatclj/s

(get-default-format response {:keys [response-format] :as request})

get-formatclj/s

(get-format request format-entry)

Converts one of a number of types to a response format. Note that it processes [text format] the same as format, which makes it easier to work with detection vectors such as default-formats.

It also supports providing formats as raw functions. I don't know if anyone has ever used this.

Converts one of a number of types to a response format.
Note that it processes `[text format]` the same as `format`,
which makes it easier to work with detection vectors such as
`default-formats`.

It also supports providing formats as raw functions. I don't 
know if anyone has ever used this.
raw docstring

raw-response-formatclj/s

(raw-response-format)
(raw-response-format _)

This will literally return whatever the underlying implementation considers has been sent. Obviously, this is highly implementation dependent, gives different results depending on your platform but is nonetheless really rather useful.

This will literally return whatever the underlying implementation
considers has been sent. Obviously, this is highly implementation
dependent, gives different results depending on your platform but
is nonetheless really rather useful.
raw docstring

response-to-stringclj

(response-to-string response)

Interprets the response as text (a string). Isn't likely to give you a good outcome if the response wasn't text.

Interprets the response as text (a string). Isn't likely 
to give you a good outcome if the response wasn't text.
raw docstring

text-request-formatclj/s

(text-request-format)

text-response-formatclj/s≠

clj
(text-response-format)
(text-response-format _)
cljs

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

× close