Small injectable HTTP boundary used by provider clients.
A method that cannot be sent is {:error, {:http_method_not_supported, refuser, method}}, where refuser is Imp.HTTP for a method outside method/0, or the transport that cannot send it.
{:error, {:http_method_not_supported, refuser, method}}
refuser
Imp.HTTP
method/0
@type method() :: :get | :post | :put | :patch | :delete
@callback post(String.t(), [{String.t(), String.t()}], iodata(), keyword()) :: {:ok, %{status: non_neg_integer(), body: binary(), headers: list()}} | {:error, term()}
@callback request(method(), String.t(), [{String.t(), String.t()}], iodata(), keyword()) :: {:ok, %{status: non_neg_integer(), body: binary(), headers: list()}} | {:error, term()}
@callback stream(String.t(), [{String.t(), String.t()}], iodata(), keyword()) :: Enumerable.t()