grisp_updater_http behaviour (grisp_updater v2.3.0)
View SourceSummary
Callbacks
Given a URL, return {Host,Port,Opts}. Return not_supported to delegate to another backend.
Initialize optional HTTP HAL that customizes connections/requests (TLS, auth). Return opaque state.
Customize request path and headers before issuing the HTTP request.
Types
Callbacks
-callback http_connection_options(State :: term(), Url :: binary()) -> {ok, Host :: inet:hostname() | inet:ip_address(), Port :: inet:port_number(), Opts :: gun:opts(), State :: term()} | not_supported | {error, term()}.
Given a URL, return {Host,Port,Opts}. Return not_supported to delegate to another backend.
Initialize optional HTTP HAL that customizes connections/requests (TLS, auth). Return opaque state.
-callback http_request_options(State :: term(), Method :: method(), Url :: binary(), Path :: binary()) -> {ok, Path :: binary(), Headers :: [{binary(), binary()}], State :: term()} | {error, term()}.
Customize request path and headers before issuing the HTTP request.