HTTP client, retry logic, and request/response handling for Yahoo Finance API.
HTTP client, retry logic, and request/response handling for Yahoo Finance API.
(get-with-failover* urls {:keys [ticker parse-fn]})GET each URL in urls in turn until one succeeds. Each URL gets up to 3
attempts with exponential backoff (250ms base, plus jitter) for transient
failures (429, connection errors, 5xx). Returns the first success, or the
last failure.
Options: :ticker - added to error maps :parse-fn - (fn [status body] -> {:ok? ...}), called for every status but 429; must return an error for statuses it does not accept
GET each URL in `urls` in turn until one succeeds. Each URL gets up to 3
attempts with exponential backoff (250ms base, plus jitter) for transient
failures (429, connection errors, 5xx). Returns the first success, or the
last failure.
Options:
:ticker - added to error maps
:parse-fn - (fn [status body] -> {:ok? ...}), called for every status but
429; must return an error for statuses it does not accept(try-fetch* ticker query-params)Try fetching from primary URL, fallback to secondary on failure. Includes retry with backoff for transient errors.
Try fetching from primary URL, fallback to secondary on failure. Includes retry with backoff for transient errors.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |