Defines the IHttpAdapter protocol and the default hato-based implementation.
Separating transport from business logic allows consumers to inject a MockAdapter in tests or swap in any alternative HTTP client without touching SDK namespaces.
Defines the IHttpAdapter protocol and the default hato-based implementation. Separating transport from business logic allows consumers to inject a MockAdapter in tests or swap in any alternative HTTP client without touching SDK namespaces.
(default-adapter)Returns a new HatoAdapter instance. Consumers can replace this with their own record implementing IHttpAdapter.
Returns a new HatoAdapter instance. Consumers can replace this with their own record implementing IHttpAdapter.
Thin abstraction over HTTP so the SDK is not coupled to a specific client.
Thin abstraction over HTTP so the SDK is not coupled to a specific client.
(request this opts)Executes an HTTP request described by opts map.
Expected keys in opts:
:method – :get | :post | :patch | :put | :delete
:url – full URL string
:headers – map of string->string headers
:body – serialised request body (string) or nil
Must return a map with at least: :status – HTTP status code (integer) :body – parsed response body (map/vector)
Executes an HTTP request described by `opts` map. Expected keys in `opts`: :method – :get | :post | :patch | :put | :delete :url – full URL string :headers – map of string->string headers :body – serialised request body (string) or nil Must return a map with at least: :status – HTTP status code (integer) :body – parsed response body (map/vector)
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 |