Supabase.Fetcher.Adapter behaviour (supabase_potion v0.6.1)
Behaviour that defines the interface to implement different HTTP clients
as backends for the Supabase.Fetcher
request builder.
Summary
Types
@type request_opts() :: keyword()
@type response() :: Supabase.Fetcher.response()
Callbacks
@callback request(Supabase.Fetcher.Request.t(), request_opts()) :: {:ok, response()} | {:error, term()}
@callback request_async(Supabase.Fetcher.Request.t(), request_opts()) :: {:ok, response()} | {:error, term()}
@callback stream(Supabase.Fetcher.Request.t(), request_opts()) :: {:ok, response()} | {:error, term()}
@callback stream(Supabase.Fetcher.Request.t(), on_response, request_opts()) :: {:ok, response()} | {:error, term()} when on_response: ({Supabase.Fetcher.status(), Supabase.Fetcher.headers(), body :: Enumerable.t()} -> {:ok, response()} | {:error, term()})
@callback upload(Supabase.Fetcher.Request.t(), filepath :: Path.t(), request_opts()) :: {:ok, response()} | {:error, term()}
Functions
@spec not_implemented_error(module(), atom(), integer()) :: Supabase.Error.t()