hackney_util (hackney v2.0.0)
View SourceSummary
Functions
Get the default protocols for HTTP connections. Returns the value of the default_protocols` application env, or `[http2, http1] if not set.
filter a proplists and only keep allowed keys
Start the given applications if they were not already started.
set the default options in a proplists if not defined
Functions
-spec default_protocols() -> [http3 | http2 | http1].
Get the default protocols for HTTP connections. Returns the value of the default_protocols` application env, or `[http2, http1] if not set.
The order determines preference: HTTP/2 is preferred, then HTTP/1.1.
To enable HTTP/3 (experimental):
application:set_env(hackney, default_protocols, [http3, http2, http1]).
-spec filter_options([{atom(), any()} | {raw, any(), any(), any()}], [atom()], Acc) -> Acc when Acc :: [any()].
filter a proplists and only keep allowed keys
-spec require([module()]) -> ok.
Start the given applications if they were not already started.
set the default options in a proplists if not defined