Helper functions for the HTTP client.
Helper functions for the HTTP client.
(base64-encode unencoded)
Encode an array of bytes into a base64 encoded string.
Encode an array of bytes into a base64 encoded string.
(deflate b)
Returns a deflate'd version of the given byte array.
Returns a deflate'd version of the given byte array.
(force-byte-array b)
force b as byte array if it is an InputStream, also close the stream
force b as byte array if it is an InputStream, also close the stream
(gunzip b)
Returns a gunzip'd version of the given byte array.
Returns a gunzip'd version of the given byte array.
(gzip b)
Returns a gzip'd version of the given byte array.
Returns a gzip'd version of the given byte array.
(inflate b)
Returns a zlib inflate'd version of the given byte array or InputStream.
Returns a zlib inflate'd version of the given byte array or InputStream.
(lower-case-keys m)
Recursively lower-case all map keys that are strings.
Recursively lower-case all map keys that are strings.
(opt req param)
Check the request parameters for a keyword boolean option, with or without the ?
Returns false if either of the values are false, or the value of (or key1 key2) otherwise (truthy)
Check the request parameters for a keyword boolean option, with or without the ? Returns false if either of the values are false, or the value of (or key1 key2) otherwise (truthy)
(parse-content-type s)
Parse s
as an RFC 2616 media type.
Parse `s` as an RFC 2616 media type.
(url-decode encoded & [encoding])
Returns the form-url-decoded version of the given string, using either a specified encoding or UTF-8 by default.
Returns the form-url-decoded version of the given string, using either a specified encoding or UTF-8 by default.
(url-encode unencoded & [encoding])
Returns an UTF-8 URL encoded version of the given string.
Returns an UTF-8 URL encoded version of the given string.
(utf8-bytes s)
Returns the UTF-8 bytes corresponding to the given string.
Returns the UTF-8 bytes corresponding to the given string.
(utf8-string b)
Returns the String corresponding to the UTF-8 decoding of the given bytes.
Returns the String corresponding to the UTF-8 decoding of the given bytes.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close