HTTP transport of the copy.top client, on java.net.http.HttpClient (JDK 11 or later, no dependency).
A transport is a function of one map {:url :headers :timeout} (timeout in seconds) returning {:status int, :headers {lower-case-name value}, :body string}. When no HTTP answer was received it throws an ex-info whose data has :type :copytop/network. Tests pass a fake one.
HTTP transport of the copy.top client, on java.net.http.HttpClient (JDK 11
or later, no dependency).
A transport is a function of one map {:url :headers :timeout} (timeout in
seconds) returning {:status int, :headers {lower-case-name value}, :body
string}. When no HTTP answer was received it throws an ex-info whose data
has :type :copytop/network. Tests pass a fake one.(http-transport)(http-transport {:keys [connect-timeout http-client] :or {connect-timeout 10}})The default transport. Options: :connect-timeout in seconds (default 10), :http-client a java.net.http.HttpClient of your own.
The default transport. Options: :connect-timeout in seconds (default 10), :http-client a java.net.http.HttpClient of your own.
(network-error url message cause)The ex-info thrown when the API could not be reached.
The ex-info thrown when the API could not be reached.
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 |