3
,我發現有一個例子讓與HttpKit網絡數據下面的代碼我們可否與HttpClient的lib中的cookie進行Clojure的
(http/get "http://host.com/path")
(def options {:timeout 200 ; ms
:basic-auth ["user" "pass"]
:query-params {:param "value" :param2 ["value1" "value2"]}
:user-agent "User-Agent-string"
:headers {"X-Header" "Value"}})
(http/get "http://host.com/path" options
(fn [{:keys [status headers body error]}] ;; asynchronous response handling
(if error
(println "Failed, exception is " error)
(println "Async HTTP GET: " status))))
但是,是有可能的餅乾傳遞給它呢?
問候 亞歷