Functions for making HTTP requests and processing responses.
RFC 5988: https://tools.ietf.org/html/rfc5988
Functions for making HTTP requests and processing responses. RFC 5988: https://tools.ietf.org/html/rfc5988
The currently-bound default HTTP client
The currently-bound default HTTP client
(find-links headers)
Finds and parses all the Link headers in the given header map. Links are returned in the same order as the corresponding headers in the response. Any malformed Link headers are ignored and removed from the output.
Finds and parses all the Link headers in the given header map. Links are returned in the same order as the corresponding headers in the response. Any malformed Link headers are ignored and removed from the output.
(get-uri uri)
(get-uri uri client)
Executes a HTTP GET request against the given URI
Executes a HTTP GET request against the given URI
Represents a client for making HTTP GET requests
Represents a client for making HTTP GET requests
(http-get this uri)
(is-not-found-response? {:keys [status]})
Indicates whether the response map represents a 'not found' response.
Indicates whether the response map represents a 'not found' response.
(is-ok-response? {:keys [status] :as response})
Whether the given map represents a successful HTTP response
Whether the given map represents a successful HTTP response
(parse-header header-string)
Parses a header into its value and an associated map of parameter values.
Parses a header into its value and an associated map of parameter values.
(parse-link-header header-string)
Parse a Link header value into a map conforming to the ::link spec. The target of the link is associated with the ::link-uri key, any other parameters of the link are associated with unqualified keys in the result map.
Parse a Link header value into a map conforming to the ::link spec. The target of the link is associated with the ::link-uri key, any other parameters of the link are associated with unqualified keys in the result map.
Whether two link relation types are equal. Relation types are compared case-insensitively.
Whether two link relation types are equal. Relation types are compared case-insensitively.
(with-http-client client & body)
Executes body with the given HttpClient implementation as the default
Executes body with the given HttpClient implementation as the default
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close