Skip to content

RPC call cannot set headers in 1.0.0-dev.4 #197

Open
@dsyrstad

Description

@dsyrstad

Prior to 1.0.0, I was able to set headers on an rpc request (somewhat awkwardly):

  builder = client
        .rpc('fn_taking_single_jsonb_param', params: request);
  builder.headers['Prefer'] = 'params=single-object';
  await builder.execute();

I was able to do this because PostgrestBuilder previously exposed headers. The headers are now private and I can find no way to set them. PostgrestClient still seems to expose headers, but I don't have access to it via SupabaseClient.

See https://postgrest.org/en/stable/api.html#calling-functions-with-a-single-json-parameter for the params=single-object value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    postgrestThis issue or pull request is related to postgrest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions