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.
(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.
(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-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.
(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.
(text-response-format)
(text-response-format _)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close