Skip to content

supabase-community/functions-swift

Repository files navigation

functions-swift

Warning

This repository is deprecated and it was moved to the monorepo. Repository will remain live to support old versions of the library, but any new updates MUST be done on the monorepo.

Swift Client library to interact with Supabase Functions.

Usage

let client = FunctionsClient(
  url: URL(string: "https://project-id.supabase.com/functions/v1")!,
  headers: [
    "apikey": "project-api-key"
  ]
)

struct Response: Decodable {
  let message: String
}

let response: Response = try await client.invoke(
  functionName: "hello-world",
  invokeOptions: FunctionInvokeOptions(body: ["name": "Functions"])
)

assert(response.message = "Hello Functions")

About

Swift Client library to interact with Supabase Functions.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages