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})
source

content-type-matchesclj/s

(content-type-matches content-type accept)
source

detect-content-typeclj/s

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

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

detect-response-format-readclj/s

(detect-response-format-read request)
source

get-accept-entriesclj/s

(get-accept-entries request format-entry)
source

get-default-formatclj/s

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

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

text-request-formatclj/s

(text-request-format)
source

text-response-formatclj/s≠

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

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

× close