Adapted from https://www.github.com/dakrone/clj-http
Adapted from https://www.github.com/dakrone/clj-http
The default list of middleware hato uses for wrapping requests.
The default list of middleware hato uses for wrapping requests.
(detect-charset content-type)
Given a charset header, detect the charset, returns UTF-8 if not found.
Given a charset header, detect the charset, returns UTF-8 if not found.
(generate-query-string-with-encoding params encoding multi-param-style)
(gunzip b)
Returns a gunzip'd version of the given byte array or input stream.
Returns a gunzip'd version of the given byte array or input stream.
(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.
(multipart-request {:keys [multipart] :as req})
Adds appropriate body and header if making a multipart request.
Adds appropriate body and header if making a multipart request.
(muuntaja-instance
{:keys [muuntaja] :or {muuntaja default-muuntaja-instance} :as req})
(nest-params-request {:keys [content-type flatten-nested-keys] :as req})
Middleware wrapping nested parameters for query strings.
Middleware wrapping nested parameters for query strings.
(opt req param)
Checks 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)
Checks 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-url url)
Parse a URL string into a map of interesting parts.
Parse a URL string into a map of interesting parts.
(url-encode unencoded & [encoding])
Returns a UTF-8 URL encoded version of the given string.
Returns a UTF-8 URL encoded version of the given string.
(url-encode-illegal-characters path-or-query)
Takes a raw url path or query and url-encodes any illegal characters. Minimizes ambiguity by encoding space to %20.
Takes a raw url path or query and url-encodes any illegal characters. Minimizes ambiguity by encoding space to %20.
(wrap-accept client)
Middleware converting the :accept key in a request to application/<type>
Middleware converting the :accept key in a request to application/<type>
(wrap-accept-encoding client)
Middleware converting the :accept-encoding option to an acceptable Accept-Encoding header in the request.
Middleware converting the :accept-encoding option to an acceptable Accept-Encoding header in the request.
(wrap-basic-auth client)
Middleware converting the :basic-auth option into an Authorization header.
Middleware converting the :basic-auth option into an Authorization header.
(wrap-content-type client)
Middleware converting a :content-type <keyword>
option to the formal
application/<name> format and adding it as a header.
Middleware converting a `:content-type <keyword>` option to the formal application/<name> format and adding it as a header.
(wrap-decompression client)
Middleware handling automatic decompression of responses from web servers. If
:decompress-body is set to false, does not automatically set Accept-Encoding
header or decompress body.
Middleware handling automatic decompression of responses from web servers. If :decompress-body is set to false, does not automatically set `Accept-Encoding` header or decompress body.
(wrap-exceptions client)
Middleware that throws response as an ExceptionInfo if the response has unsuccessful status code. :throw-exceptions set to false in the request disables this middleware.
Middleware that throws response as an ExceptionInfo if the response has unsuccessful status code. :throw-exceptions set to false in the request disables this middleware.
(wrap-form-params client)
Middleware wrapping the submission or form parameters.
Middleware wrapping the submission or form parameters.
(wrap-method client)
Middleware converting the :method option into the :request-method option
Middleware converting the :method option into the :request-method option
(wrap-multipart client)
Middleware wrapping multipart requests.
Middleware wrapping multipart requests.
(wrap-muuntaja client)
Middleware wrapping muuntaja options.
Middleware wrapping muuntaja options.
(wrap-nested-params client)
Middleware wrapping nested parameters for query strings.
Middleware wrapping nested parameters for query strings.
(wrap-oauth client)
Middleware converting the :oauth-token option into an Authorization header.
Middleware converting the :oauth-token option into an Authorization header.
(wrap-query-params client)
Middleware converting the :query-params option to a querystring on the request.
Middleware converting the :query-params option to a querystring on the request.
(wrap-request request)
(wrap-request request middleware)
Returns a batteries-included HTTP request function corresponding to the given core client. See default-middleware for the middleware wrappers that are used by default, which you can enrich with your muuntaja options or instance according to your needs for different content types.
Returns a batteries-included HTTP request function corresponding to the given core client. See default-middleware for the middleware wrappers that are used by default, which you can enrich with your muuntaja options or instance according to your needs for different content types.
(wrap-request-timing client)
Middleware that times the request, putting the total time (in milliseconds) of the request into the :request-time key in the response.
Middleware that times the request, putting the total time (in milliseconds) of the request into the :request-time key in the response.
(wrap-response-body-coercion client)
Middleware converting a response body from a byte-array to a different object.
Defaults to a String if no :as key is specified, the coerce-response-body
multimethod may be extended to add additional coercions.
Middleware converting a response body from a byte-array to a different object. Defaults to a String if no :as key is specified, the `coerce-response-body` multimethod may be extended to add additional coercions.
(wrap-url client)
Middleware wrapping request URL parsing.
Middleware wrapping request URL parsing.
(wrap-user-info client)
Middleware converting the :user-info option into a :basic-auth option
Middleware converting the :user-info option into a :basic-auth option
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close