setHeader method

FunctionsClient setHeader(
  1. String key,
  2. String value
)

Sets an HTTP header for subsequent invocations.

Returns this for method chaining. A header passed to invoke still wins over it for that single call. On a client managed by a SupabaseClient, assign SupabaseClient.headers instead, so that every client gets the header.

functions.setHeader('x-custom-header', 'value');

Implementation

FunctionsClient setHeader(String key, String value) {
  _headers[key] = value;
  return this;
}