FunctionsClient class

Client for invoking Supabase Edge Functions.

Constructors

FunctionsClient(String url, Map<String, String> headers, {Client? httpClient, AsyncJsonCodec? jsonCodec, FunctionsRegion? region, Future<String?> accessToken()?, Duration? requestTimeout})
jsonCodec encodes the request body and decodes the response. The default codec keeps large payloads off the calling isolate. A codec passed here is owned by the caller, so dispose leaves it alone; call dispose when you're done with a client that created its own.

Properties

hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
The headers sent with every invocation, as an unmodifiable view.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → Future<void>
Disposes the JSON codec and closes the HTTP client the client created for itself.
invoke(String functionName, {Map<String, String>? headers, Object? body, Iterable<MultipartFile>? files, Map<String, Object?>? queryParameters, HttpMethod method = HttpMethod.post, FunctionsRegion? region, Future<void>? abortSignal, Duration? requestTimeout}) → Future<FunctionsResponse>
Invokes a function
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setHeader(String key, String value) → FunctionsClient
Sets an HTTP header for subsequent invocations.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited