Defines the behavior for http client.
Summary
Types
@type body() :: binary()
@type error() :: :timeout | {:unexpected_status, status()} | :response_body_limit_exceeded | :http_client
@type filename() :: String.t()
@type headers() :: [header()]
@type option() :: {:max_redirects, non_neg_integer() | nil} | {:max_retries, non_neg_integer()} | {:receive_timeout_ms, non_neg_integer()} | {:connect_timeout_ms, non_neg_integer()} | {:max_body_length_bytes, non_neg_integer() | nil} | {:backoff_factor_ms, non_neg_integer()} | {:backoff_max_ms, non_neg_integer()}
@type options() :: [option()]
@type status() :: 100..599
@type url() :: String.t()
Callbacks
@callback get(url(), headers(), options()) :: {:ok, response()} | {:error, error_response()}