Behaviour for HTTP clients.
Allows mocking HTTP requests in tests. Exosphere.ATProto.HTTP implements
this behaviour and is the default adapter.
Summary
Types
@type response() :: %{ status: pos_integer(), headers: [{String.t(), String.t()}], body: json_term() }
Callbacks
@callback get(String.t(), request_opts()) :: {:ok, response()} | {:error, term()}
@callback post(String.t(), request_opts()) :: {:ok, response()} | {:error, term()}
@callback request(atom(), String.t(), request_opts()) :: {:ok, response()} | {:error, term()}