clj-httpClojure的HTTP客戶(hù)端包
clj-http 是一個(gè)新的 Clojure HTTP 客戶(hù)端開(kāi)發(fā)包,主要特點(diǎn)是設(shè)計(jì)簡(jiǎn)單、可靠、可擴(kuò)展和可測(cè)試。
示例代碼:
(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/"}
評(píng)論
圖片
表情
