1.2.0 permalink Arrow_down_16x16
  • (headers http-agnt)
Returns a map of HTTP response headers. Header names are converted
to keywords in all lower-case Header values are strings. If a
header appears more than once, only the last value is returned.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/http/agent.clj:331 top

(defn headers
  "Returns a map of HTTP response headers.  Header names are converted
  to keywords in all lower-case Header values are strings.  If a
  header appears more than once, only the last value is returned."
  [http-agnt]
  (reduce (fn [m [^String k v]]
            (assoc m (when k (keyword (.toLowerCase k))) (last v)))
          {} (.getHeaderFields
              ^HttpURLConnection (::connection @http-agnt))))
Vars in clojure.contrib.http.agent/headers: assoc defn fn keyword last reduce when deref
Used in 0 other vars

Comments top

No comments for headers. Log in to add a comment.