Namespace dealing with HTTP link headers
Imported from https://github.com/dakrone/clj-http/blob/217393258e7863514debece4eb7b23a7a3fa8bd9/src/clj_http/links.clj
Namespace dealing with HTTP link headers Imported from https://github.com/dakrone/clj-http/blob/217393258e7863514debece4eb7b23a7a3fa8bd9/src/clj_http/links.clj
(wrap-links client)
Returns request wrapper fn for client
that adds
a :links
key to the response map that contains parsed link headers.
The links are returned as a map, with the 'rel' value being the key. The URI is placed under the 'href' key, to mimic the HTML link element.
e.g. Link: http://example.com/page2.html; rel=next; title="Page 2" => {:links {:next {:href "http://example.com/page2.html" :title "Page 2"}}}
Returns request wrapper fn for `client` that adds a `:links` key to the response map that contains parsed link headers. The links are returned as a map, with the 'rel' value being the key. The URI is placed under the 'href' key, to mimic the HTML link element. e.g. Link: <http://example.com/page2.html>; rel=next; title="Page 2" => {:links {:next {:href "http://example.com/page2.html" :title "Page 2"}}}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close