livery_client_hackney (livery v0.2.0)
View SourceDefault client adapter: hackney.
hackney 4.2 speaks HTTP/1.1, HTTP/2, and HTTP/3 (with TLS, pooling, and
IPv6), so this one adapter covers every protocol. The request body may be
buffered ({full, _}) or a producer ({stream, Fun}); the response is
buffered by default, or streamed ({stream, Reader}) when the request
sets stream => true.
Opts (the client's adapter_opts) may carry hackney => [opt], a list
of raw hackney options forwarded verbatim (e.g. {ssl_options, _}, a
pool name, HTTP/3 controls like zero_rtt/family).
hackney's request/5 always buffers the response, so any request that
either streams its body or wants a streamed response goes through the
connection API (request with a stream body, start_response,
stream_body).
Summary
Functions
-spec request(livery_client:request(), map()) -> {ok, livery_client:response()} | {error, term()}.