Liking cljdoc? Tell your friends :D

commensura.http

Shared HTTP+JSON helpers for the live data sources (FRED CPI, CurrencyFreaks). http-kit for the request, clojure.data.json for the body. Failures throw an ex-info tagged :remote-error so callers can decide whether to fall back.

Shared HTTP+JSON helpers for the live data sources (FRED CPI, CurrencyFreaks). http-kit for the
request, `clojure.data.json` for the body. Failures throw an ex-info tagged `:remote-error` so
callers can decide whether to fall back.
raw docstring

decimal->ratioclj

(decimal->ratio s)

A decimal (or integer) value string -> an exact rational, or nil for anything that isn't a number (e.g. FRED's missing-value "."). Whole numbers may arrive without a decimal point ("14").

A decimal (or integer) value string -> an exact rational, or nil for anything that isn't a number
(e.g. FRED's missing-value "."). Whole numbers may arrive without a decimal point ("14").
sourceraw docstring

get-jsonclj

(get-json url query-params)

GET url with query-params (a string->string map) and parse the JSON body into a Clojure map (keyword keys). Throws an ex-info tagged :remote-error on a transport error or non-200 status.

GET `url` with `query-params` (a string->string map) and parse the JSON body into a Clojure map
(keyword keys). Throws an ex-info tagged `:remote-error` on a transport error or non-200 status.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close