Provides wrap-header-map, which is middleware allows headers to be specified more flexibly. In requests and responses, headers can be accessed as strings or keywords of any case. In requests, string header names will be sent to the server with their casing unchanged, while keyword header names will be transformed into their canonical HTTP representation (e.g. :accept-encoding will become "Accept-Encoding").
Provides wrap-header-map, which is middleware allows headers to be specified more flexibly. In requests and responses, headers can be accessed as strings or keywords of any case. In requests, string header names will be sent to the server with their casing unchanged, while keyword header names will be transformed into their canonical HTTP representation (e.g. :accept-encoding will become "Accept-Encoding").
(assoc-join headers name value)
Like assoc, but will join multiple values into a vector if the given key is already present into the map.
Like assoc, but will join multiple values into a vector if the given key is already present into the map.
(canonicalize k)
Transforms a keyword header name into its canonical string representation.
The canonical string representation is title-cased words separated by dashes, like so: :date -> "Date", :DATE -> "Date", and :foo-bar -> "Foo-Bar".
However, there is special-casing for some common headers, so: :p3p -> "P3P", and :content-md5 -> "Content-MD5".
Transforms a keyword header name into its canonical string representation. The canonical string representation is title-cased words separated by dashes, like so: :date -> "Date", :DATE -> "Date", and :foo-bar -> "Foo-Bar". However, there is special-casing for some common headers, so: :p3p -> "P3P", and :content-md5 -> "Content-MD5".
(header-iterator-seq headers)
Takes a HeaderIterator and returns a seq of vectors of name/value pairs of headers.
Takes a HeaderIterator and returns a seq of vectors of name/value pairs of headers.
(header-map & keyvals)
Returns a new header map with supplied mappings.
Returns a new header map with supplied mappings.
(lower-case s)
Converts a string to all lower-case, using the root locale.
Warning: This is not a general purpose lower-casing function -- it is useful for case-insensitive comparisons of strings, not for converting a string into something that's useful for humans.
Converts a string to all lower-case, using the root locale. Warning: This is not a general purpose lower-casing function -- it is useful for case-insensitive comparisons of strings, not for converting a string into something that's useful for humans.
(normalize k)
Turns a string or keyword into normalized form, which is a lowercase string.
Turns a string or keyword into normalized form, which is a lowercase string.
(special-case s)
Returns the special-case capitalized version of a string if that string is a special case, otherwise returns the string unchanged.
Returns the special-case capitalized version of a string if that string is a special case, otherwise returns the string unchanged.
A collection of HTTP headers that do not follow the normal Looks-Like-This casing.
A collection of HTTP headers that do not follow the normal Looks-Like-This casing.
(title-case c)
Converts a character to titlecase.
Converts a character to titlecase.
(wrap-header-map client)
Middleware that converts headers from a map into a header-map.
Middleware that converts headers from a map into a header-map.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close