Search
@type body() :: nil | map()
@type error() :: (message :: binary()) | {code :: binary(), message :: binary()}
@type headers() :: nil | [{binary(), binary()}]
@type method() :: :get | :post | :delete
@type params() :: nil | keyword()
@type path() :: binary()
@type request() :: %{ :method => method(), optional(:headers) => headers(), :path => path(), optional(:params) => params(), optional(:body) => params() }
@type response() :: response(map())
@type response(t) :: {:ok, t} | {:error, error()}
@callback request(request()) :: response()
@spec request(request()) :: response()