-
-
Save dakrone/01c46b660465356bf0d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clj-http.foo | |
(:require [clj-http.client :as client])) | |
(def url-list-from-symbols ["http://www.aoeu.com" "http://www.aoeu.com/bad"]) | |
(defn async-gets [urls] | |
(doall (map #(future (client/get % {:throw-exceptions false})) | |
urls))) | |
(let [gets (async-gets (take 10 url-list-from-symbols)) | |
fail? (fn [req-fut] (not (client/success? @req-fut)))] | |
(map fail? gets)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment