clj-http 是一个新的 Clojure HTTP 客户端开发包,主要特点是设计简单、可靠、可扩展和可测试。
示例代码:
(require '[clj-http.client :as client]) (client/get "http://rest-test.heroku.com/") => {:status 200 :headers {"date" "Sun, 01 Aug 2010 07:03:49 GMT" "cache-control" "private, max-age=0, must-revalidate" "content-type" "text/html; charset=utf-8" ...} :body "GET http://rest-test.heroku.com/"}