Liking cljdoc? Tell your friends :D

liberator.conneg


accept-fragmentclj

(accept-fragment f)

Take something like "text/html" or "image/; q=0.8" and return a map like {:type ["image" ""] :q 0.8}

If the fragment is invalid, nil is returned.

Take something like
  "text/html"
or
  "image/*; q=0.8"
and return a map like
  {:type ["image" "*"]
    :q 0.8}

If the fragment is invalid, nil is returned.
sourceraw docstring

accept-fragment-param-reclj

source

accept-fragment-reclj

source

acceptable-typeclj

(acceptable-type type-pair acceptable-pair)

Compare two type pairs. If the pairing is acceptable, return the most specific. E.g., for

["text" "plain"] ["" ""]

returns

["text" "plain"].

Compare two type pairs. If the pairing is acceptable,
 return the most specific.
E.g., for

  ["text" "plain"] ["*" "*"]

returns

  ["text" "plain"].
sourceraw docstring

allowed-types-filterclj

(allowed-types-filter allowed-types)
source

assoc-server-weight-fnclj

(assoc-server-weight-fn allowed-types)
source

best-allowed-charsetclj

(best-allowed-charset accepts-header available)
source

best-allowed-content-typeclj

(best-allowed-content-type accepts-header)
(best-allowed-content-type accepts-header allowed-types)

Return the first type in the Accept header that is acceptable. allowed-types is a set containing pairs (e.g., ["text" "*"]) or strings (e.g., "text/plain").

Definition of "acceptable": An Accept header fragment of "text/" is acceptable when allowing "text/plain". An Accept header fragment of "text/plain" is acceptable when allowing "text/".

Return the first type in the Accept header that is acceptable.
allowed-types is a set containing pairs (e.g., ["text" "*"])
or strings (e.g., "text/plain").

Definition of "acceptable":
An Accept header fragment of "text/*" is acceptable when allowing
"text/plain".
An Accept header fragment of "text/plain" is acceptable when allowing
"text/*".
sourceraw docstring

best-allowed-encodingclj

(best-allowed-encoding accepts-header available)
source

best-allowed-languageclj

(best-allowed-language accepts-header available)
source

params->mapclj

(params->map params)
source

parse-accepts-headerclj

(parse-accepts-header accepts-header)
source

remove-last-subtagclj

(remove-last-subtag langtag)
source

select-bestclj

(select-best candidates score-fn)
source

sorted-acceptclj

(sorted-accept accepts-header allowed-types)
source

split-qvalclj

(split-qval caq)
source

stringifyclj

(stringify type)
source

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

× close