Functions

HttpRequest alias

Alias of ::hot::http/HttpRequest

HttpResponse alias

Alias of ::hot::http/HttpResponse

body-or-error

fn (response: ::hot::http/HttpResponse): Any

encode-body

fn (body: Any): Str

has-body

fn (body: Any): Bool

http-request alias

Alias of ::hot::http/request

is-ok-response alias

Alias of ::hot::http/is-ok-response

ns alias

Alias of ::supabase::admin::api/

request

fn (method: Str, path: Str): Any
fn (method: Str, path: Str, additional-headers: Map, body: Any): Any
fn (method: Str, path: Str, additional-headers: Map, body: Any, access-token: Str): Any

Call the Supabase Management API. Authentication uses a Personal Access Token (PAT) as a Bearer token.

Example

::api ::supabase::admin::api

response ::api/request("GET", "/projects")
Context Vars: supabase.access.token

request-raw

fn (method: Str, path: Str): ::hot::http/HttpResponse
fn (method: Str, path: Str, additional-headers: Map, body: Any): ::hot::http/HttpResponse
fn (method: Str, path: Str, additional-headers: Map, body: Any, access-token: Str): ::hot::http/HttpResponse

Call the Supabase Management API and return the full HttpResponse including status and headers.

Context Vars: supabase.access.token

Types

HttpError

HttpError type {
    status: Int,
    headers: Map,
    body: Any
}