Dowser. Client. HTTP. Adapter behaviour
(Dowser.Client v0.1.1)
View Source
Behaviour implemented by every HTTP transport (:httpc, Req, :hackney).
Adapters are pure transport: given a fully-resolved request, they perform it
and return a normalized Dowser.Client.Response (or an error). They do
not encode/decode bodies — that is the JSON layer's job.
The url is expected to be a complete, absolute URL (endpoint + path +
query string already joined). headers are string tuples. body is raw
iodata or nil. opts are adapter-specific passthrough options; see each
adapter's docs for the keys it understands.
Bundled implementations:
Dowser.Client.HTTP.Httpc— OTP:httpc(no extra dependency)Dowser.Client.HTTP.Req— theReqlibrary (optional dependency)Dowser.Client.HTTP.Hackney—:hackney(optional dependency)Dowser.Client.HTTP.Stub— scriptable stub for tests (no extra dependency)