hex_http behaviour (hex_core v0.21.1)
View SourceHTTP contract.
Summary
Functions
The error parameter of the first Bearer challenge that has one in a response's www-authenticate header (RFC 6750 section 3), or undefined when there is none.
Types
Callbacks
-callback request_to_file(method(), URI :: binary(), headers(), body(), file:name_all(), adapter_config()) -> {ok, {status(), headers()}} | {error, term()}.
Functions
The error parameter of the first Bearer challenge that has one in a response's www-authenticate header (RFC 6750 section 3), or undefined when there is none.
The header is read the way RFC 9110 section 11.6.1 defines it: it can hold several challenges, a scheme can be followed by a token68 or by parameters, scheme and parameter names are case-insensitive, and a parameter value is a token or a quoted string.
-spec request_to_file(hex_core:config(), method(), URI :: binary(), headers(), body(), file:name_all()) -> {ok, {status(), headers()}} | {error, term()}.