Liking cljdoc? Tell your friends :D

monero-store.collect.http

Outbound HTTP as a port, so every adapter above it is testable with a map.

One shape in — {:http/method :http/url :http/headers :http/body} — and one shape out: {:http/status :http/body}, the body already parsed when it was JSON. Only this namespace knows which client library is on the classpath.

Outbound HTTP as a port, so every adapter above it is testable with a map.

One shape in — {:http/method :http/url :http/headers :http/body} — and one
shape out: {:http/status :http/body}, the body already parsed when it was
JSON. Only this namespace knows which client library is on the classpath.
raw docstring

hato-clientclj

(hato-client {:keys [timeout-ms] :or {timeout-ms 10000}})

IHttp over hato. :timeout-ms bounds every call; a store must not block on a ticker or a wallet gateway forever.

IHttp over hato. `:timeout-ms` bounds every call; a store must not block on
a ticker or a wallet gateway forever.
sourceraw docstring

IHttpcljprotocol

requestclj

(request this req)

Perform req. Returns {:http/status :http/body}.

A transport failure is a status of 0 and a nil body: an adapter deciding what an unreachable service means is doing its job, and an exception crossing this port would make every caller do it with try/catch.

Perform `req`. Returns {:http/status :http/body}.

A transport failure is a status of 0 and a nil body: an adapter deciding
what an unreachable service means is doing its job, and an exception
crossing this port would make every caller do it with try/catch.
source

ok?clj

(ok? {:http/keys [status]})

True for a 2xx response.

True for a 2xx response.
sourceraw docstring

parse-jsonclj

(parse-json body)

body as parsed JSON, or nil when it is not JSON at all.

`body` as parsed JSON, or nil when it is not JSON at all.
sourceraw docstring

stub-clientclj

(stub-client respond-fn)

IHttp from a function of the request. The whole test seam.

respond-fn returns {:http/status :http/body}, or nil for "unreachable".

IHttp from a function of the request. The whole test seam.

`respond-fn` returns {:http/status :http/body}, or nil for "unreachable".
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