Supabase.FetcherBehaviour behaviour (supabase_potion v0.5.1)

Defines Supabase HTTP Clients callbacks

Summary

Types

@type body() :: nullable(map()) | map()
@type headers() :: [{String.t(), String.t()}]
@type method() :: :get | :post
@type opts() :: [{:resolve_json, boolean()}] | []
@type reason() :: String.t() | atom()
@type response() :: map() | String.t()
@type result() :: {:ok, response()} | {:error, reason()}
@type url() :: String.t() | URI.t()

Callbacks

Link to this callback

delete(url, body, headers, opts)

@callback delete(url(), body(), headers(), opts()) :: result()
Link to this callback

get(url, body, headers, opts)

@callback get(url(), body(), headers(), opts()) :: result()
Link to this callback

head(url, body, headers, opts)

@callback head(url(), body(), headers(), opts()) :: result()
Link to this callback

patch(url, body, headers, opts)

@callback patch(url(), body(), headers(), opts()) :: result()
Link to this callback

post(url, body, headers, opts)

@callback post(url(), body(), headers(), opts()) :: result()
Link to this callback

put(url, body, headers, opts)

@callback put(url(), body(), headers(), opts()) :: result()
Link to this callback

stream(url, headers, keyword)

@callback stream(url(), headers(), keyword()) :: {:ok, stream} | {:error, reason()}
when stream: Enumerable.t()
Link to this callback

upload(method, url, t, headers)

@callback upload(method(), url(), Path.t(), headers()) :: result()