View Source Unleash.HTTPClientAdapter behaviour (Unleash v1.12.5)
Behaviour that all http clients must implement in order to be compatible
Summary
Types
@type error_reason() :: any()
@type headers() :: [header()]
@type response() :: %{status: non_neg_integer(), headers: headers(), body: map()}
Callbacks
@callback get(url :: String.t(), headers()) :: {:ok, response()} | {:error, error_reason()}
@callback post(url :: String.t(), headers(), body :: String.t()) :: {:ok, response()} | {:error, error_reason()}